diff --git a/tests/features/S2N_ATOMIC_SUPPORTED.c b/tests/features/S2N_ATOMIC_SUPPORTED.c index e9244361f4c..3e2b29407d6 100644 --- a/tests/features/S2N_ATOMIC_SUPPORTED.c +++ b/tests/features/S2N_ATOMIC_SUPPORTED.c @@ -18,9 +18,9 @@ int main() { /* Atomic builtins are supported by gcc 4.7.3 and later. */ - sig_atomic_t atomic = 0; - __atomic_test_and_set(&atomic, __ATOMIC_RELAXED); - __atomic_clear(&atomic, __ATOMIC_RELAXED); + sig_atomic_t atomic = 0, value = 1; + __atomic_store(&atomic, &value, __ATOMIC_RELAXED); + __atomic_load(&atomic, &value, __ATOMIC_RELAXED); /* _Static_assert is supported for C99 by gcc 4.6 and later, * so using it here shouldn't limit use of the atomic builtins. */