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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [nest.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR 5967, PR 7114 */
2
/* { dg-do run } */
3
/* { dg-require-profiling "-pg" } */
4
/* { dg-options "-O2 -pg" } */
5
/* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */
6
/* { dg-error "profiler" "No profiler support" { target xstormy16-*-* } 0 } */
7
 
8
extern void abort (void);
9
 
10
long foo (long x)
11
{
12
  long i, sum = 0;
13
  long bar (long z) { return z * 2; }
14
 
15
  for (i = 0; i < x; i++)
16
    sum += bar (i);
17
 
18
  return sum;
19
}
20
 
21
int main (void)
22
{
23
  if (foo(10) != 90)
24
    abort ();
25
  return 0;
26
}
27
 
28
/* { dg-final { cleanup-profile-file } } */

powered by: WebSVN 2.1.0

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