OSDN Git Service

* c-lex.c (interpret_float): Give a pedwarn rather than a warning
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20010912-1.c
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 } */
5
6 extern void abort (void);
7 extern void exit (int);
8
9 int bar (int x, char **y)
10 {
11   if (x != 56)
12     abort ();
13   if (**y != 'a')
14     abort ();
15   *y = "def";
16   return 1;
17 }
18
19 int baz (int x, char **y)
20 {
21   if (x != 56)
22     abort ();
23   if (**y != 'a')
24     abort ();
25   return 26;
26 }
27
28 int foo (int x, char *y)
29 {
30   int a;
31   char *b = y;
32   a = bar (x, &y);
33   if (a)
34     {
35       y = b;
36       a = baz (x, &y);
37     }
38   if (a)
39     return a;
40
41   baz (x, &y);
42   return 0;
43 }
44
45 int main ()
46 {
47   if (foo (56, "abc") != 26)
48     abort ();
49   exit (0);
50 }