2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.misc-tests / gcov-5b.c
blobcbd3958718ccc4758b19d894580f89cf270d4d0c
1 /* Check that branch percentages are calculated in variables
2 that are large enough to hold the count. */
4 /* { dg-options "-fprofile-arcs -ftest-coverage" } */
5 /* { dg-do run { target native } } */
7 #define LIMIT1 7000
8 #define LIMIT2 7000
10 int count;
12 void incr_count ()
14 count++;
17 void doit (int i, int j)
19 if (i > j)
20 incr_count ();
23 int main ()
25 int i, j;
27 for (i = 0; i < LIMIT1; i++)
28 for (j = 0; j < LIMIT2; j++)
29 doit (i, j);
31 return 0;
34 /* { dg-final { run-gcov branches { -b gcov-5b.c } } } */