Debian Codegraph @

gcc/testsuite/g++.dg/eh/omit-frame-pointer2.C

raw
1 // Reduced from PR c++/5246, PR c++/2447
2 // { dg-options "-O -fomit-frame-pointer" }
3 // { dg-do run }
4
5 void step (int)
6 {
7 void *sp = __builtin_alloca (0);
8 }
9
10 void f2 (void)
11 {
12 step (2);
13 throw int();
14 }
15
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
30 int main ()
31 {
32 f1 ();
33 return 0;
34 }