The case in PR113746 used to ICE until commit f04dc89a991. This patch
simply adds the case to the testsuite.

Successfully tested on x86_64-pc-linux-gnu.

        PR c++/113746

gcc/testsuite/ChangeLog:

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

---
 gcc/testsuite/g++.dg/parse/crash76.C | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/parse/crash76.C

diff --git a/gcc/testsuite/g++.dg/parse/crash76.C 
b/gcc/testsuite/g++.dg/parse/crash76.C
new file mode 100644
index 00000000000..6fbd1fa9f7e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/crash76.C
@@ -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 };
+};
-- 
2.44.0


Reply via email to