2 /* { dg-additional-options "-DSYNC_FALLBACK" { target { ! cas_int } } } */
5 /* The SYNC_FALLBACK code is just so we don't have to restrict this test
6 to any subset of targets. For targets with no atomics support at
7 all, the cas_int effective-target is false and the fallback provides
8 a PASS. Where the bug trigs (at the time this test-case was added),
9 cas_int is also false but the fallback isn't used. */
10 __attribute__((__noinline__
, __noclone__
))
12 # if __INT_MAX__ == 0x7fff
13 __sync_fetch_and_add_2
15 __sync_fetch_and_add_4
26 __attribute__((__noinline__
, __noclone__
))
27 void g (int *at
, int val
)
30 __sync_fetch_and_add (at
, val
);
35 /* On PTX it is not valid to perform atomic operations on auto
36 variables, which end up in .local. Making this static places it