summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.eh/crash1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.eh/crash1.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/crash1.C22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/crash1.C b/gcc/testsuite/g++.old-deja/g++.eh/crash1.C
new file mode 100644
index 000000000..a4440c7bd
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.eh/crash1.C
@@ -0,0 +1,22 @@
+// { dg-do assemble }
+// { dg-options "-O1 -fno-inline-functions" }
+
+struct A
+{
+ ~A ();
+};
+
+bool foo ();
+
+int i;
+int j;
+
+A bar ()
+{
+ for (i = 0; i < 1; ++i)
+ if (j)
+ {
+ A tmp;
+ return tmp;
+ }
+}