OSDN Git Service

* gcc.dg/pragma-darwin.c: Improve for ppc64.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20021018-1.c
1 /* { dg-do run { target fpic } } */
2 /* { dg-options "-O2 -fpic" } */
3 /* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
4
5 extern void abort (void);
6 extern void exit (int);
7
8 #if __INT_MAX__ >= 2147483647L
9 static const long foo [10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
10
11 long __attribute__((noinline))
12 bar (int x)
13 {
14   return foo [x - 0x6ffffffa];
15 }
16
17 int
18 main (void)
19 {
20   if (bar (0x6ffffffc) != 2)
21     abort ();
22   exit (0);
23 }
24 #else
25 int
26 main (void)
27 {
28   exit (0);
29 }
30 #endif