PR target/55146
[official-gcc.git] / gcc / testsuite / gcc.dg / pr33676.c
blob79c830eabfb216ec544cc2e19212ba073c4d4f60
1 /* { dg-do run } */
2 /* { dg-options "-O0 -mtune=i386 -fomit-frame-pointer" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
4 __attribute__((noreturn,noinline)) void abrt (const char *fi, const char *fu)
6 __builtin_abort ();
9 __attribute__((noinline)) int f (int k)
11 return k;
14 __attribute__((noinline)) int g (int t, int k)
16 int b;
18 switch (t)
20 case 0:
21 abrt (__FILE__, __FUNCTION__);
23 case 1:
24 b = f (k);
25 break;
27 case 2:
28 b = f (k);
29 break;
31 case 3:
32 b = f (k);
33 break;
35 case 4:
36 b = f (k);
37 break;
39 default:
40 abrt (__FILE__, __FUNCTION__);
43 return b;
46 int main (void)
48 if (g (3, 1337) != 1337)
49 abrt (__FILE__, __FUNCTION__);
50 return 0;