Fix typo
[official-gcc.git] / gcc / testsuite / gcc.dg / nest.c
blobadb9f0dca8203fe75844c34aa461e98bda3e65b8
1 /* PR 5967, PR 7114 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -pg" } */
4 /* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */
5 /* { dg-error "profiler" "No profiler support" { target mmix-*-* xstormy16-*-* } 0 } */
6 /* Support for -pg on irix relies on gcrt1.o which doesn't exist yet.
7 See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html */
8 /* { dg-error "gcrt1.o" "Profiler support missing" { target mips*-*-irix* } 0 } */
9 /* { dg-error "-pg not supported" "Profiler support missing" { target *-*-sco3.2v5* } 0 } */
11 long foo (long x)
13 long i, sum = 0;
14 long bar (long z) { return z * 2; }
16 for (i = 0; i < x; i++)
17 sum += bar (i);
19 return sum;
22 int main (void)
24 if (foo(10) != 90)
25 abort ();
26 return 0;