2 /* { dg-options "-O2 -p" } */
3 /* { dg-options "-O2 -p -static" { target hppa*-*-hpux* } } */
4 /* { dg-error "profiler" "No profiler support" { target mmix-*-* xstormy16-*-* } 0 } */
5 /* { dg-error "" "consider using `-pg' instead of `-p' with gprof(1)" { target *-*-freebsd* } 0 } */
6 /* Support for -p on solaris2 relies on mcrt1.o which comes with the
7 vendor compiler. We cannot reiably predict the directory where the
8 vendor compiler (and thus mcrt1.o) is installed so we can't
9 necessarily find mcrt1.o even if we have it. */
10 /* { dg-error "mcrt1.o" "Optional vendor profiler support missing" { target *-*-solaris2* } 0 } */
11 /* Support for -p on irix relies on libprof1.a which doesn't appear to
12 exist on any irix6 system currently posting testsuite results. */
13 /* { dg-error "libprof1.a" "Profiler support missing" { target mips*-*-irix* } 0 } */
15 extern void abort (void);
16 extern void exit (int);
20 static int bar (int x)
24 return bar (1) + bar (2);