PR ipa/61602
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / stackalign / non-local-goto-3.c
blobf18366f9c0f0efb06303b6b444eda7e7f8cf9743
1 /* { dg-do run } */
2 /* { dg-require-effective-target nonlocal_goto } */
4 #ifndef NO_TRAMPOLINES
5 extern void abort (void);
7 int x(int a, int b)
9 __label__ xlab;
11 void y(int b)
13 switch (b)
15 case 1: goto xlab;
16 case 2: goto xlab;
20 a = a + 2;
21 y (b);
23 xlab:
24 return a;
27 int main ()
29 int i, j;
31 for (j = 1; j <= 2; ++j)
32 for (i = 1; i <= 2; ++i)
34 int a = x (j, i);
35 if (a != 2 + j)
36 abort ();
39 return 0;
41 #else
42 int main() { return 0; }
43 #endif