aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.misc-tests/gcov-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.misc-tests/gcov-1.c')
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-1.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-1.c b/gcc/testsuite/gcc.misc-tests/gcov-1.c
new file mode 100644
index 00000000000..20fc950dddc
--- /dev/null
+++ b/gcc/testsuite/gcc.misc-tests/gcov-1.c
@@ -0,0 +1,20 @@
+/* Test Gcov basics. */
+
+/* { dg-options "-fprofile-arcs -ftest-coverage" } */
+/* { dg-do run { target native } } */
+
+noop ()
+{
+}
+
+main ()
+{
+ int i;
+
+ for (i = 0; i < 10; i++) /* count(11) */
+ noop (); /* count(10) */
+
+ return 0; /* count(1) */
+}
+
+/* { dg-final { run-gcov gcov-1.c } } */