]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/setjmp-3.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / setjmp-3.c
CommitLineData
4f6c2131
EB
1/* { dg-do run } */
2/* { dg-options "-O" } */
631da28e 3/* { dg-require-effective-target indirect_jumps } */
4f6c2131
EB
4
5#include <setjmp.h>
6
7extern void abort (void);
8
9jmp_buf buf;
10
5c596005 11void raise0(void)
4f6c2131
EB
12{
13 __builtin_longjmp (buf, 1);
14}
15
16int execute(int cmd)
17{
18 int last = 0;
19
20 if (__builtin_setjmp (buf) == 0)
21 while (1)
22 {
5c596005
AT
23 last = 1;
24 raise0 ();
4f6c2131
EB
25 }
26
27 if (last == 0)
28 return 0;
29 else
30 return cmd;
31}
32
33int main(void)
34{
35 if (execute (1) == 0)
36 abort ();
37
38 return 0;
39}