aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr61776.c
blob: 8768c546bdaa7b13ad3875230ca58b96ffd82524 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* { dg-do compile } */
/* { dg-options "-O2 -fprofile-generate" } */

#include <setjmp.h>

int cond1, cond2;

int goo() __attribute__((noinline));

int goo() {
 if (cond1)
   return 1;
 else
   return 2;
}

jmp_buf env;
int foo() {
 int a;

 setjmp(env);
 if (cond2)
   a = goo();
 else
   a = 3;
 return a;
}