1 // Reduced from PR c++/5246, PR c++/2447
2 // { dg-options "-O -fomit-frame-pointer" }
3 // { dg-do run }
4 
step(int)5 void step (int)
6 {
7   void *sp = __builtin_alloca (0);
8 }
9 
f2(void)10 void f2 (void)
11 {
12   step (2);
13   throw int();
14 }
15 
f1(void)16 void f1 (void)
17 {
18   try
19     {
20       step (1);
21       f2 ();
22       step (-1);
23     }
24   catch (int)
25     {
26       step (3);
27     }
28 }
29 
main()30 int main ()
31 {
32   f1 ();
33   return 0;
34 }
35