* gcc.dg/const-elim-1.c: Remove xfail for xtensa-*-*.
[official-gcc.git] / gcc / testsuite / gcc.dg / 20010912-1.c
blob7769b496e55545bda30865bc569d66dfa0d0a094
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fpic" } */
3 /* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* cris-*-aout* mmix-*-* } 0 } */
4 /* { dg-bogus "\[Uu\]nresolved symbol .(_GLOBAL_OFFSET_TABLE_|\[_.A-Za-z\]\[_.0-9A-Za-z\]*@(PLT|GOT|GOTOFF))" "PIC unsupported" { xfail *-*-netware* } 0 } */
6 extern void abort (void);
7 extern void exit (int);
9 int bar (int x, char **y)
11 if (x != 56)
12 abort ();
13 if (**y != 'a')
14 abort ();
15 *y = "def";
16 return 1;
19 int baz (int x, char **y)
21 if (x != 56)
22 abort ();
23 if (**y != 'a')
24 abort ();
25 return 26;
28 int foo (int x, char *y)
30 int a;
31 char *b = y;
32 a = bar (x, &y);
33 if (a)
35 y = b;
36 a = baz (x, &y);
38 if (a)
39 return a;
41 baz (x, &y);
42 return 0;
45 int main ()
47 if (foo (56, "abc") != 26)
48 abort ();
49 exit (0);