LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / non-local-goto-1.c
blobc8202c9908a9de5e814c265718dca98f8d552f87
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
3 /* { dg-require-effective-target nonlocal_goto } */
5 extern void abort (void);
7 int global;
9 static int foo(void) __attribute__((noinline));
11 static int foo(void)
13 global = 1;
16 static int bar(void)
18 foo ();
21 int execute(int cmd)
23 __label__ start;
25 void raise(void)
27 goto start;
30 int last;
32 bar ();
34 last = 0;
36 start:
38 if (last == 0)
39 while (1)
41 last = 1;
42 raise ();
45 if (last == 0)
46 return 0;
47 else
48 return cmd;
51 int main(void)
53 if (execute (1) == 0)
54 abort ();
56 return 0;