]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/atomic-load-5.c
1 /* Test __atomic routines for existence and proper execution on 16 byte
2 values with each valid memory model. */
4 /* { dg-require-effective-target sync_int_128_runtime } */
5 /* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
7 extern void abort(void);
17 if (__atomic_load_n (&v
, __ATOMIC_RELAXED
) != count
++)
22 if (__atomic_load_n (&v
, __ATOMIC_ACQUIRE
) != count
++)
27 if (__atomic_load_n (&v
, __ATOMIC_CONSUME
) != count
++)
32 if (__atomic_load_n (&v
, __ATOMIC_SEQ_CST
) != count
++)
37 /* Now test the generic variants. */
39 __atomic_load (&v
, &count
, __ATOMIC_RELAXED
);
45 __atomic_load (&v
, &count
, __ATOMIC_ACQUIRE
);
51 __atomic_load (&v
, &count
, __ATOMIC_CONSUME
);
57 __atomic_load (&v
, &count
, __ATOMIC_SEQ_CST
);