builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gcc.dg / setjmp-4.c
blob20765f631d17af99d4998f25618dcefcd7914613
1 /* { dg-do run } */
2 /* { dg-options "-O" } */
3 /* { dg-require-effective-target indirect_jumps } */
5 #include <setjmp.h>
7 extern void abort (void);
9 jmp_buf buf;
11 void raise0(void)
13 __builtin_longjmp (buf, 1);
16 int execute(int cmd)
18 int last = 0;
20 __builtin_setjmp (buf);
22 if (last == 0)
23 while (1)
25 last = 1;
26 raise0 ();
29 if (last == 0)
30 return 0;
31 else
32 return cmd;
35 int main(void)
37 if (execute (1) == 0)
38 abort ();
40 return 0;