1 /* Check that gcov correctly reports line counts, branch percentages,
2 * and call return percentages for functions that call longjmp. */
4 /* { dg-options "-fprofile-arcs -ftest-coverage" } */
5 /* { dg-do run { target native } } */
12 int bar_enter, bar_exit;
13 int foo_enter, foo_exit;
17 bar_enter++; /* count(3) */
21 longjmp_taken++; /* count(1) */
25 bar_exit++; /* count(2) */
30 foo_enter++; /* count(3) */
34 longjmp_taken++; /* count(1) */
38 bar (i); /* count(2) */
40 bar (7); /* count(1) */
43 foo_exit++; /* count(1) */
73 if ((retval = setjmp (env))) {
75 val += retval; /* count(2) */
78 foo (val); /* count(3) */
80 leave (passed()); /* count(1) */
84 /* { dg-final { run-gcov -b gcov-7.c } } */