From: Marek Polacek Date: Mon, 17 Feb 2025 17:12:55 +0000 (-0500) Subject: c++: add fixed test [PR96364] X-Git-Tag: basepoints/gcc-16~1963 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5954c5a7c23fbdf3afc011d703c9fce15db04cbd;p=thirdparty%2Fgcc.git c++: add fixed test [PR96364] We were rejecting this, but the test compiles correctly since r14-6346. PR c++/96364 gcc/testsuite/ChangeLog: * g++.dg/cpp0x/gen-attrs-88.C: New test. --- diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-88.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-88.C new file mode 100644 index 00000000000..f90b7a4661d --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-88.C @@ -0,0 +1,14 @@ +// PR c++/96364 +// { dg-do compile { target c++14 } } + +auto a[[]] [[]](); +auto a() {} + +void v[[]] [[]](); +void v() {} + +void g() +{ + v(); + return a(); +}