https://gcc.gnu.org/g:5954c5a7c23fbdf3afc011d703c9fce15db04cbd
commit r15-7590-g5954c5a7c23fbdf3afc011d703c9fce15db04cbd Author: Marek Polacek <pola...@redhat.com> Date: Mon Feb 17 12:12:55 2025 -0500 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: --- gcc/testsuite/g++.dg/cpp0x/gen-attrs-88.C | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 000000000000..f90b7a4661dc --- /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(); +}