Add new test to verify that the array index, limit, and stride are
[official-gcc.git] / gcc / testsuite / gcc.dg / non-local-goto-1.c
blob2bace076fad3b4fb39deb389bb7685cb853e7304
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
4 extern void abort (void);
6 int global;
8 static foo(void) __attribute__((noinline));
10 static foo(void)
12 global = 1;
15 static bar(void)
17 foo ();
20 int execute(int cmd)
22 __label__ start;
24 void raise(void)
26 goto start;
29 int last;
31 bar ();
33 last = 0;
35 start:
37 if (last == 0)
38 while (1)
40 last = 1;
41 raise ();
44 if (last == 0)
45 return 0;
46 else
47 return cmd;
50 int main(void)
52 if (execute (1) == 0)
53 abort ();
55 return 0;