| 1 |
/* { dg-options "--coverage -fpath-coverage -g -O2" } */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-require-effective-target sigsetjmp } */ |
| 4 |
|
| 5 |
#include <setjmp.h> |
| 6 |
|
| 7 |
extern sigjmp_buf jmpbuf; |
| 8 |
typedef void (*sfun) (void); |
| 9 |
extern sfun getfn (int); |
| 10 |
|
| 11 |
/* This distilled srunner setup/teardown functions in check-0.15.2. The |
| 12 |
combination of setjmp, optimization, and debug statements causes a problem |
| 13 |
if the gimple statement iterator is not positioned correctely before adding |
| 14 |
instrumentation code. */ |
| 15 |
|
| 16 |
extern void |
| 17 |
debug_after_labels (int *itr) |
| 18 |
{ |
| 19 |
for (; *itr; ++itr) |
| 20 |
{ |
| 21 |
sfun fn = getfn (*itr); |
| 22 |
if (setjmp (jmpbuf) == 0) |
| 23 |
fn (); |
| 24 |
} |
| 25 |
} |