]>
Commit | Line | Data |
---|---|---|
b7a95a1a WM |
1 | /* { dg-do compile } */ |
2 | /* { dg-options "-O2 -fprofile-generate" } */ | |
55466f20 | 3 | /* { dg-require-profiling "-fprofile-generate" } */ |
b7a95a1a WM |
4 | |
5 | #include <setjmp.h> | |
6 | ||
7 | int cond1, cond2; | |
8 | ||
9 | int goo() __attribute__((noinline)); | |
10 | ||
11 | int goo() { | |
12 | if (cond1) | |
13 | return 1; | |
14 | else | |
15 | return 2; | |
16 | } | |
17 | ||
18 | jmp_buf env; | |
19 | int foo() { | |
20 | int a; | |
21 | ||
22 | setjmp(env); | |
23 | if (cond2) | |
24 | a = goo(); | |
25 | else | |
26 | a = 3; | |
27 | return a; | |
28 | } |