xref: /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/gcc.misc-tests/gcov-1.c (revision c87b03e512fc05ed6e0222f6fb0ae86264b1d05b)
1 /* Test Gcov basics.  */
2 
3 /* { dg-options "-fprofile-arcs -ftest-coverage" } */
4 /* { dg-do run { target native } } */
5 
noop()6 void noop ()
7 {
8 }
9 
main()10 int main ()
11 {
12   int i;
13 
14   for (i = 0; i < 10; i++)	/* count(11) */
15     noop ();			/* count(10) */
16 
17   return 0;			/* count(1) */
18 }
19 
20 /* { dg-final { run-gcov gcov-1.c } } */
21