OSDN Git Service

* config/alpha/freebsd.h (LINK_SPEC): Weaken error to notice.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20021014-1.c
1 /* { dg-do run } */
2 /* { dg-options "-O2 -p" } */
3 /* { dg-error "profiler" "No profiler support" { target mmix-*-* } 0 } */
4 /* { dg-error "" "consider using `-pg' instead of `-p' with gprof(1)" { target *-*-freebsd* } 0 } */
5 /* Support for -p on solaris2 relies on mcrt1.o which comes with the
6    vendor compiler.  We cannot reiably predict the directory where the
7    vendor compiler (and thus mcrt1.o) is installed so we can't
8    necessarily find mcrt1.o even if we have it.  */
9 /* { dg-error "mcrt1.o" "Optional vendor profiler support missing" { target *-*-solaris2* } 0 } */
10 /* Support for -p on irix relies on libprof1.a which doesn't appear to
11    exist on any irix6 system currently posting testsuite results.  */
12 /* { dg-error "libprof1.a" "Profiler support missing" { target mips*-*-irix* } 0 } */
13
14 extern void abort (void);
15 extern void exit (int);
16
17 int foo (void)
18 {
19   static int bar (int x)
20   {
21     return x + 3;
22   }
23   return bar (1) + bar (2);
24 }
25
26 int main (void)
27 {
28   if (foo () != 9)
29     abort ();
30   exit (0);
31 }