1 /* Check that branch percentages are calculated in variables 2 that are large enough to hold the count. */ 3 4 /* { dg-options "-fprofile-arcs -ftest-coverage" } */ 5 /* { dg-do run { target native } } */ 6 7 #define LIMIT1 7000 8 #define LIMIT2 7000 9 10 int count; 11 incr_count()12void incr_count () 13 { 14 count++; 15 } 16 doit(int i,int j)17void doit (int i, int j) 18 { 19 if (i > j) 20 incr_count (); 21 } 22 main()23int main () 24 { 25 int i, j; 26 27 for (i = 0; i < LIMIT1; i++) 28 for (j = 0; j < LIMIT2; j++) 29 doit (i, j); 30 31 return 0; 32 } 33 34 /* { dg-final { run-gcov branches { -b gcov-5b.c } } } */ 35