From: Jakub Jelinek Date: Tue, 15 Nov 2022 07:13:06 +0000 (+0100) Subject: c++: Add testcase for DR 2392 X-Git-Tag: basepoints/gcc-14~3160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cf165de63c5d2726bba9f0809a233bd63b84842;p=thirdparty%2Fgcc.git c++: Add testcase for DR 2392 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 * g++.dg/DRs/dr2392.C: Add testcase for DR 2392. --- diff --git a/gcc/testsuite/g++.dg/DRs/dr2392.C b/gcc/testsuite/g++.dg/DRs/dr2392.C new file mode 100644 index 000000000000..e24d6a7f9287 --- /dev/null +++ b/gcc/testsuite/g++.dg/DRs/dr2392.C @@ -0,0 +1,12 @@ +// DR 2392 +// { dg-do compile { target c++11 } } + +template +constexpr int +foo () +{ + T t; + return 1; +} + +using V = decltype (new int[foo ()]);