gcc/testsuite/gcc.dg/bitint-77.c
raw| 1 | /* PR c/113518 */ |
| 2 | /* { dg-do compile { target bitint } } */ |
| 3 | /* { dg-options "-O2 -std=c23" } */ |
| 4 | |
| 5 | #if __BITINT_MAXWIDTH__ >= 607 |
| 6 | _BitInt(607) v; |
| 7 | #else |
| 8 | _BitInt(63) v; |
| 9 | #endif |
| 10 | |
| 11 | void |
| 12 | foo (void) |
| 13 | { |
| 14 | __atomic_fetch_or (&v, 1 << 31, __ATOMIC_RELAXED); |
| 15 | } |
| 16 | |
| 17 | #if __BITINT_MAXWIDTH__ >= 16321 |
| 18 | _BitInt(16321) w; |
| 19 | |
| 20 | void |
| 21 | bar (void) |
| 22 | { |
| 23 | __atomic_fetch_add (&w, 1 << 31, __ATOMIC_SEQ_CST); |
| 24 | } |
| 25 | #endif |