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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [nest.c] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 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
}

powered by: WebSVN 2.1.0

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