diff options
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests/gcov-34.c')
-rw-r--r-- | gcc/testsuite/gcc.misc-tests/gcov-34.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-34.c b/gcc/testsuite/gcc.misc-tests/gcov-34.c new file mode 100644 index 0000000..e3c04e0 --- /dev/null +++ b/gcc/testsuite/gcc.misc-tests/gcov-34.c @@ -0,0 +1,29 @@ +/* { dg-options "--coverage -fpath-coverage" } */ +/* { dg-do run { target native } } */ + +/* BEGIN paths + summary: 1/2 + expect covered: 14(true) 15 18 + expect: 14(false) 17 18 +*/ +void +covered (int a) +/* END */ +{ + int v = 0; + if (a) + v++; + else + v--; +} + +/* BEGIN paths + summary: 1/1 + expect covered: 24 +*/ +int main () +{ + covered (1); +} + +/* { dg-final { run-gcov prime-paths { --prime-paths-lines=both gcov-34.c } } } */ |