| 1 |
/* { dg-options "-fprofile-arcs -ftest-coverage" } */ |
| 2 |
/* { dg-do run { target native } } */ |
| 3 |
/* { dg-require-effective-target indirect_jumps } */ |
| 4 |
|
| 5 |
void *buf[5]; |
| 6 |
|
| 7 |
void fjmp (void) { |
| 8 |
__builtin_longjmp (buf, 1); |
| 9 |
} |
| 10 |
|
| 11 |
int main(void) |
| 12 |
{ |
| 13 |
int last = 0; |
| 14 |
|
| 15 |
if (__builtin_setjmp (buf) == 0) { /* count(2) */ |
| 16 |
__builtin_printf("True branch\n"); |
| 17 |
while (1) { |
| 18 |
last = 1; /* count(1) */ |
| 19 |
fjmp (); /* count(1) */ |
| 20 |
} |
| 21 |
} else { |
| 22 |
__builtin_printf("False branch\n"); |
| 23 |
} |
| 24 |
|
| 25 |
return 0; |
| 26 |
} |
| 27 |
|
| 28 |
/* { dg-final { run-gcov gcov-pr85372.c } } */ |