]> gcc.gnu.org Git - gcc.git/commitdiff
new test
authorJason Merrill <jason@gcc.gnu.org>
Wed, 18 Dec 2002 16:41:11 +0000 (11:41 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 18 Dec 2002 16:41:11 +0000 (11:41 -0500)
From-SVN: r60258

gcc/testsuite/g++.dg/eh/omit-frame-pointer2.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/eh/omit-frame-pointer2.C b/gcc/testsuite/g++.dg/eh/omit-frame-pointer2.C
new file mode 100644 (file)
index 0000000..9ddf2ed
--- /dev/null
@@ -0,0 +1,35 @@
+// Reduced from PR c++/5246, PR c++/2447
+// { dg-options "-O -fomit-frame-pointer" }
+// { dg-options "-O -fomit-frame-pointer -mno-accumulate-outgoing-args" { target i?86-*-* } }
+// { dg-do run }
+
+void step (int)
+{
+  void *sp = __builtin_alloca (0);
+}
+
+void f2 (void)
+{
+  step (2);
+  throw int();
+}
+
+void f1 (void)
+{
+  try
+    {
+      step (1);
+      f2 ();
+      step (-1);
+    }
+  catch (int)
+    {
+      step (3);
+    }
+}
+
+int main ()
+{
+  f1 ();
+  return 0;
+}
This page took 0.06247 seconds and 5 git commands to generate.