aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2025-02-17 12:12:55 -0500
committerMarek Polacek <polacek@redhat.com>2025-02-17 12:15:23 -0500
commit5954c5a7c23fbdf3afc011d703c9fce15db04cbd (patch)
treebd1117ee03b2be04d674a24c165b27763f9d8445
parentdfd0ced98fcf62c4d24979b74c1d52334ff62bfc (diff)
downloadgcc-5954c5a7c23fbdf3afc011d703c9fce15db04cbd.zip
gcc-5954c5a7c23fbdf3afc011d703c9fce15db04cbd.tar.gz
gcc-5954c5a7c23fbdf3afc011d703c9fce15db04cbd.tar.bz2
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.
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-88.C14
1 files changed, 14 insertions, 0 deletions
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 0000000..f90b7a4
--- /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();
+}