* gcc.dg/atomic-flag.c: Adjust for __GCC_ATOMIC_TEST_AND_SET_TRUEVAL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183583
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-01-27 Richard Henderson <rth@redhat.com>
+
+ * gcc.dg/atomic-flag.c: Adjust for __GCC_ATOMIC_TEST_AND_SET_TRUEVAL.
+
2012-01-26 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gfortran.dg/reassoc_4.f: Use dg-additional-options.
/* Test __atomic routines for existence and execution. */
/* { dg-do run } */
-#include <stdbool.h>
-
/* 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);