diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d9744f536d1..21dfd9151e9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-01-27 Richard Henderson + + * gcc.dg/atomic-flag.c: Adjust for __GCC_ATOMIC_TEST_AND_SET_TRUEVAL. + 2012-01-26 Andreas Krebbel * gfortran.dg/reassoc_4.f: Use dg-additional-options. diff --git a/gcc/testsuite/gcc.dg/atomic-flag.c b/gcc/testsuite/gcc.dg/atomic-flag.c index 771df2c6091..1b768326188 100644 --- a/gcc/testsuite/gcc.dg/atomic-flag.c +++ b/gcc/testsuite/gcc.dg/atomic-flag.c @@ -1,27 +1,25 @@ /* Test __atomic routines for existence and execution. */ /* { dg-do run } */ -#include - /* Test that __atomic_test_and_set and __atomic_clear builtins execute. */ extern void abort(void); -bool a; +unsigned char a; main () { - bool b; + int b; __atomic_clear (&a, __ATOMIC_RELAXED); if (a != 0) abort (); b = __atomic_test_and_set (&a, __ATOMIC_SEQ_CST); - if (a != 1 || b != 0) + if (a != __GCC_ATOMIC_TEST_AND_SET_TRUEVAL || b != 0) abort (); b = __atomic_test_and_set (&a, __ATOMIC_ACQ_REL); - if (b != 1 || a != 1) + if (a != __GCC_ATOMIC_TEST_AND_SET_TRUEVAL || b != 1) abort (); __atomic_clear (&a, __ATOMIC_SEQ_CST);