On 8/23/24 5:11 AM, Simon Martin wrote:
The case in PR113746 used to ICE until commit f04dc89a991. This patch

Please use the git gcc-descr output instead of the raw SHA for referring to previous commits; in this case that would be r15-123-gf04dc89a991ddc or just r15-123. OK with that tweak.

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 };
+};

Reply via email to