OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.misc-tests/] [gcov-5b.c] - Blame information for rev 756

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 690 jeremybenn
/* 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
 
12
void incr_count ()
13
{
14
  count++;
15
}
16
 
17
void doit (int i, int j)
18
{
19
  if (i > j)
20
    incr_count ();
21
}
22
 
23
int 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 } } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.