summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/eh3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/eh3.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/eh3.C33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/eh3.C b/gcc/testsuite/g++.old-deja/g++.other/eh3.C
new file mode 100644
index 000000000..4e6189282
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/eh3.C
@@ -0,0 +1,33 @@
+// { dg-do run }
+// { dg-options "-O" }
+typedef struct { } e;
+
+char *p;
+
+void _Jv_throw ();
+
+int barf (int len)
+{
+ char a[len];
+
+ p = a;
+ _Jv_throw ();
+ return 0;
+}
+
+void _Jv_throw ()
+{
+ e ex;
+ throw ex;
+}
+
+int main ()
+{
+ try {
+ barf (2);
+ }
+ catch (...) {
+ }
+
+ return 0;
+}