PR tree-optimization/86401
[official-gcc.git] / gcc / testsuite / c-c++-common / asmgoto-4.c
blob4532bf196eee1a29a7816db8f1dd0c0572985000
1 /* PR middle-end/44071 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
5 static inline int
6 f1 (void)
8 asm goto ("" : : : : l1, l2);
9 __builtin_unreachable ();
10 l1:
11 return 1;
12 l2:
13 return 0;
16 int
17 b1 (int x)
19 if (f1 () || x == 6)
20 x = 1;
21 else
22 x = 2;
23 return x;
26 static inline int
27 f2 (void)
29 asm goto ("" : : : : l1, l2);
30 l1:
31 return 1;
32 l2:
33 return 0;
36 int
37 b2 (int x)
39 if (f2 () || x == 6)
40 x = 1;
41 else
42 x = 2;
43 return x;