summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/crash48.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/parse/crash48.C')
-rw-r--r--gcc/testsuite/g++.dg/parse/crash48.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/parse/crash48.C b/gcc/testsuite/g++.dg/parse/crash48.C
new file mode 100644
index 000000000..45415484b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/crash48.C
@@ -0,0 +1,9 @@
+// PR c++/37530
+// { dg-do compile }
+
+void
+foo (bool b)
+{
+ if (b)
+ try { throw 0; } catch (X) { } // { dg-error "expected type-specifier before" }
+}