aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.misc-tests/gcov-33.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests/gcov-33.c')
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-33.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-33.c b/gcc/testsuite/gcc.misc-tests/gcov-33.c
new file mode 100644
index 0000000..ecfa8c2
--- /dev/null
+++ b/gcc/testsuite/gcc.misc-tests/gcov-33.c
@@ -0,0 +1,27 @@
+/* { dg-options "--coverage -fpath-coverage" } */
+/* { dg-do run { target native } } */
+
+/* BEGIN paths
+ summary: 1/2
+ expect covered: 13(true) 14 17
+*/
+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=covered gcov-33.c } } } */