* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
[official-gcc.git] / gcc / testsuite / gcc.dg / nest.c
blob7178bd820459c632c81994bacb87f7702592c4e5
1 /* 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 } */
8 extern void abort (void);
10 long foo (long x)
12 long i, sum = 0;
13 long bar (long z) { return z * 2; }
15 for (i = 0; i < x; i++)
16 sum += bar (i);
18 return sum;
21 int main (void)
23 if (foo(10) != 90)
24 abort ();
25 return 0;