1 /* Test __atomic routines for existence and proper execution on 1 byte
2 values with each valid memory model. */
4 /* { dg-require-effective-target sync_char_short } */
7 /* Test the execution of the __atomic_load_n builtin for a char. */
9 extern void abort(void);
18 if (__atomic_load_n (&v, __ATOMIC_RELAXED) != count++)
23 if (__atomic_load_n (&v, __ATOMIC_ACQUIRE) != count++)
28 if (__atomic_load_n (&v, __ATOMIC_CONSUME) != count++)
33 if (__atomic_load_n (&v, __ATOMIC_SEQ_CST) != count++)
38 /* Now test the generic variants. */
40 __atomic_load (&v, &count, __ATOMIC_RELAXED);
46 __atomic_load (&v, &count, __ATOMIC_ACQUIRE);
52 __atomic_load (&v, &count, __ATOMIC_CONSUME);
58 __atomic_load (&v, &count, __ATOMIC_SEQ_CST);