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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.misc-tests/] [gcov-11.c] - Blame information for rev 299

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

Line No. Rev Author Line
1 299 jeremybenn
/* Test gcov block mode.  */
2
 
3
/* { dg-options "-fprofile-arcs -ftest-coverage" } */
4
/* { dg-do run { target native } } */
5
 
6
int one = 1; /* subvert constant folder. */
7
int zero = 0;
8
 
9
int foo (int ix)
10
{
11
  return ix & 1 ? one : zero; /* count(10) */
12
}
13
 
14
int main ()
15
{
16
  unsigned ix, jx = 0;
17
 
18
  for (ix = 10; ix--;) jx += foo (ix); /* count(11) */
19
 
20
  return jx != 5;
21
}
22
 
23
/* { dg-final { run-gcov { -a gcov-11.c } } } */

powered by: WebSVN 2.1.0

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