]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: Add testcase for DR 2392
authorJakub Jelinek <jakub@redhat.com>
Tue, 15 Nov 2022 07:13:06 +0000 (08:13 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 15 Nov 2022 07:13:06 +0000 (08:13 +0100)
The testcase from DR 2392 passes, so I assume we don't need to do
anything further for the DR.

2022-11-15  Jakub Jelinek  <jakub@redhat.com>

* g++.dg/DRs/dr2392.C: Add testcase for DR 2392.

gcc/testsuite/g++.dg/DRs/dr2392.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/DRs/dr2392.C b/gcc/testsuite/g++.dg/DRs/dr2392.C
new file mode 100644 (file)
index 0000000..e24d6a7
--- /dev/null
@@ -0,0 +1,12 @@
+// DR 2392
+// { dg-do compile { target c++11 } }
+
+template <class T = void>
+constexpr int
+foo ()
+{
+  T t;
+  return 1;
+}
+
+using V = decltype (new int[foo ()]);