1 /* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
2 /* { dg-options "-march=opteron-sse3 -Ofast --param l1-cache-line-size=3 -Wdisabled-optimization" } */
3 /* { dg-require-effective-target indirect_jumps } */
4 
5 #include <setjmp.h>
6 
7 extern void abort (void);
8 
9 jmp_buf buf;
10 
raise0(void)11 void raise0(void)
12 {
13   __builtin_longjmp (buf, 1);
14 }
15 
execute(int cmd)16 int execute(int cmd) /* { dg-warning "'l1-cache-size' parameter is not a power of two 3" } */
17 {
18   int last = 0;
19 
20   if (__builtin_setjmp (buf) == 0)
21     while (1)
22       {
23 	last = 1;
24 	raise0 ();
25       }
26 
27   if (last == 0)
28     return 0;
29   else
30     return cmd;
31 }
32 
execute2(int cmd,int cmd2)33 int execute2(int cmd, int cmd2)
34 {
35   int last = 0;
36 
37   if (__builtin_setjmp (buf) == 0)
38     while (1)
39       {
40 	last = 1;
41 	raise0 ();
42       }
43 
44   if (last == 0)
45     return 0;
46   else
47     return cmd;
48 }
49 
50 
main(void)51 int main(void)
52 {
53   if (execute (1) == 0)
54     abort ();
55 
56   if (execute2 (1, 2) == 0)
57     abort ();
58 
59   return 0;
60 }
61