FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / gcc.dg / nest.c
blob5520aa1b070be96be275b80fbd798bc70e341c65
1 /* PR 5967, PR 7114 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -pg" } */
4 /* { dg-error "profiler" "No profiler support" { target mmix-*-* } 0 } */
5 /* Support for -pg on irix relies on gcrt1.o which doesn't exist yet.
6 See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html */
7 /* { dg-error "gcrt1.o" "Profiler support missing" { target mips*-*-irix* } 0 } */
9 long foo (long x)
11 long i, sum = 0;
12 long bar (long z) { return z * 2; }
14 for (i = 0; i < x; i++)
15 sum += bar (i);
17 return sum;
20 int main (void)
22 if (foo(10) != 90)
23 abort ();
24 return 0;