gcc/testsuite/gcc.dg/bitint-84.c
raw| 1 | /* PR tree-optimization/113737 */ |
| 2 | /* { dg-do compile { target bitint } } */ |
| 3 | /* { dg-options "-O2 -std=c23" } */ |
| 4 | |
| 5 | #if __BITINT_MAXWIDTH__ >= 129 |
| 6 | _BitInt(129) a; |
| 7 | #else |
| 8 | _BitInt(63) a; |
| 9 | #endif |
| 10 | |
| 11 | int b[1], c; |
| 12 | |
| 13 | int |
| 14 | foo (void) |
| 15 | { |
| 16 | switch (a) |
| 17 | case 0: |
| 18 | case 2: |
| 19 | return 1; |
| 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | void |
| 24 | bar (int i) |
| 25 | { |
| 26 | for (;; ++i) |
| 27 | { |
| 28 | c = b[i]; |
| 29 | if (!foo ()) |
| 30 | __asm__ (""); |
| 31 | } |
| 32 | } |