gcc/testsuite/g++.dg/ext/asmgoto1.C
raw| 1 | // PR middle-end/44102 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-O2" } |
| 4 | |
| 5 | void baz (void); |
| 6 | struct A { A (); ~A (); }; |
| 7 | |
| 8 | static inline int |
| 9 | foo (void) |
| 10 | { |
| 11 | asm goto ("" : : : : l1, l2); |
| 12 | __builtin_unreachable (); |
| 13 | l1: |
| 14 | return 1; |
| 15 | l2: |
| 16 | return 0; |
| 17 | } |
| 18 | |
| 19 | int |
| 20 | bar (int x) |
| 21 | { |
| 22 | if (x == 5) |
| 23 | { |
| 24 | A a, b; |
| 25 | baz (); |
| 26 | } |
| 27 | if (foo () || x == 6) |
| 28 | x = 1; |
| 29 | else |
| 30 | x = 2; |
| 31 | return x; |
| 32 | } |