| 1 |
/* PR target/87839 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-O2 -w" } */ |
| 4 |
|
| 5 |
long long b[64]; |
| 6 |
void foo (void); |
| 7 |
int bar (void (*) (void)); |
| 8 |
void qux (long long *, long long) __attribute__((noreturn)); |
| 9 |
void quux (long long *, long long); |
| 10 |
|
| 11 |
void |
| 12 |
baz (void) |
| 13 |
{ |
| 14 |
__sync_val_compare_and_swap (b, 4294967298LL, 78187493520LL); |
| 15 |
__sync_bool_compare_and_swap (b + 1, 8589934595LL, 21474836489LL); |
| 16 |
__sync_fetch_and_xor (b, 60129542145LL); |
| 17 |
quux (b, 42949672967LL); |
| 18 |
__sync_xor_and_fetch (b + 22, 60129542145LL); |
| 19 |
quux (b + 23, 42949672967LL); |
| 20 |
if (bar (baz)) |
| 21 |
__builtin_abort (); |
| 22 |
foo (); |
| 23 |
__sync_val_compare_and_swap (b, 4294967298LL, 0); |
| 24 |
__sync_bool_compare_and_swap (b + 1, 8589934595LL, 78187493520LL); |
| 25 |
if (__sync_or_and_fetch (b, 21474836489LL) != 21474836489LL) |
| 26 |
qux (b + 22, 60129542145LL); |
| 27 |
__atomic_fetch_nand (b + 23, 42949672967LL, __ATOMIC_RELAXED); |
| 28 |
bar (baz); |
| 29 |
} |