2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / stackalign / setjmp-3.c
blobfee0d281ffaef91bb001a4441fdc6e6a61613d49
1 /* { dg-do run } */
3 #include <setjmp.h>
5 extern void abort (void);
7 jmp_buf buf;
9 void raise0(void)
11 __builtin_longjmp (buf, 1);
14 int execute(int cmd)
16 int last = 0;
18 if (__builtin_setjmp (buf) == 0)
19 while (1)
21 last = 1;
22 raise0 ();
25 if (last == 0)
26 return 0;
27 else
28 return cmd;
31 int main(void)
33 if (execute (1) == 0)
34 abort ();
36 return 0;