1 /* Test __atomic routines for existence and proper execution on 2 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 short. */
9 extern void abort(void);
19 if (__atomic_load_n (&v, __ATOMIC_RELAXED) != count++)
24 if (__atomic_load_n (&v, __ATOMIC_ACQUIRE) != count++)
29 if (__atomic_load_n (&v, __ATOMIC_CONSUME) != count++)
34 if (__atomic_load_n (&v, __ATOMIC_SEQ_CST) != count++)
39 /* Now test the generic variants. */
41 __atomic_load (&v, &count, __ATOMIC_RELAXED);
47 __atomic_load (&v, &count, __ATOMIC_ACQUIRE);
53 __atomic_load (&v, &count, __ATOMIC_CONSUME);
59 __atomic_load (&v, &count, __ATOMIC_SEQ_CST);