summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.misc-tests/gcov-10b.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests/gcov-10b.c')
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-10b.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-10b.c b/gcc/testsuite/gcc.misc-tests/gcov-10b.c
new file mode 100644
index 000000000..148d779fd
--- /dev/null
+++ b/gcc/testsuite/gcc.misc-tests/gcov-10b.c
@@ -0,0 +1,16 @@
+/* Test gcov block mode. */
+
+/* { dg-options "-fprofile-arcs -ftest-coverage" } */
+/* { dg-do run { target native } } */
+
+int main ()
+{
+ unsigned ix, jx = 0;
+
+ ix = 10; goto test; loop: ; if (ix & 1) jx++; test: ; if (ix--) goto loop; /* count(11) */
+
+ return jx != 5;
+}
+
+/* { dg-final { run-gcov { -a gcov-10b.c } } } */
+