]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: Add testcase for (now fixed) regression [PR113746]
authorSimon Martin <simon@nasilyan.com>
Fri, 23 Aug 2024 08:49:31 +0000 (10:49 +0200)
committerSimon Martin <simon@nasilyan.com>
Sat, 24 Aug 2024 16:41:42 +0000 (18:41 +0200)
The case in PR113746 used to ICE until commit r15-123-gf04dc89a991ddc.
This patch simply adds the case to the testsuite.

PR c++/113746

gcc/testsuite/ChangeLog:

* g++.dg/parse/crash76.C: New test.

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

diff --git a/gcc/testsuite/g++.dg/parse/crash76.C b/gcc/testsuite/g++.dg/parse/crash76.C
new file mode 100644 (file)
index 0000000..6fbd1fa
--- /dev/null
@@ -0,0 +1,6 @@
+// PR c++/113746
+// { dg-do compile }
+
+template<typename_T> struct S { // { dg-error "not been declared" }
+  enum { e0 = 0, e00 = e0 };
+};