Merge reload-branch up to revision 101000
[official-gcc.git] / gcc / testsuite / gcc.dg / 20021018-1.c
blobf460e77a1eaf6b32b829ee780ec4746b38610427
1 /* { dg-do run } */
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 } */
5 extern void abort (void);
6 extern void exit (int);
8 #if __INT_MAX__ >= 2147483647L
9 static const long foo [10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
11 long __attribute__((noinline))
12 bar (int x)
14 return foo [x - 0x6ffffffa];
17 int
18 main (void)
20 if (bar (0x6ffffffc) != 2)
21 abort ();
22 exit (0);
24 #else
25 int
26 main (void)
28 exit (0);
30 #endif