diff options
author | Richard Henderson <rth@redhat.com> | 2012-01-26 14:01:17 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2012-01-26 14:01:17 -0800 |
commit | f10f4968960c57a349467e833a29e3a52b4fff41 (patch) | |
tree | bf30ec25513885b71804d9cf41511dd7993f6539 /gcc | |
parent | e29137fe36371903cee894f8706c2f906bc2754f (diff) | |
download | gcc-f10f4968960c57a349467e833a29e3a52b4fff41.zip gcc-f10f4968960c57a349467e833a29e3a52b4fff41.tar.gz gcc-f10f4968960c57a349467e833a29e3a52b4fff41.tar.bz2 |
Update gcc.dg/atomic-flag.c test for non-boolean TAS targets.
* gcc.dg/atomic-flag.c: Adjust for __GCC_ATOMIC_TEST_AND_SET_TRUEVAL.
From-SVN: r183583
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/atomic-flag.c | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d9744f5..21dfd91 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +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. diff --git a/gcc/testsuite/gcc.dg/atomic-flag.c b/gcc/testsuite/gcc.dg/atomic-flag.c index 771df2c..1b76832 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 <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); |