Restore atomic builtins usage in libstdc++-v3

PR libstdc++/70554
	* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Don't test
	__atomic_fetch_add for bool.
	* configure: Regenerate.

From-SVN: r234761
This commit is contained in:
Jonathan Wakely 2016-04-05 20:03:46 +01:00 committed by Jonathan Wakely
parent d5ec69f374
commit d2aee115cc
3 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,10 @@
2016-04-05 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/70554
* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Don't test
__atomic_fetch_add for bool.
* configure: Regenerate.
* testsuite/30_threads/thread/70503.cc: Require -static to work.
PR libstdc++/70503

View File

@ -3290,7 +3290,7 @@ AC_DEFUN([GLIBCXX_ENABLE_ATOMIC_BUILTINS], [
atomic_type c1;
atomic_type c2;
atomic_type c3(0);
__atomic_fetch_add(&c1, c2, __ATOMIC_RELAXED);
// N.B. __atomic_fetch_add is not supported for bool.
__atomic_compare_exchange_n(&c1, &c2, c3, true, __ATOMIC_ACQ_REL,
__ATOMIC_RELAXED);
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);
@ -3375,7 +3375,7 @@ int main()
atomic_type c1;
atomic_type c2;
atomic_type c3(0);
__atomic_fetch_add(&c1, c2, __ATOMIC_RELAXED);
// N.B. __atomic_fetch_add is not supported for bool.
__atomic_compare_exchange_n(&c1, &c2, c3, true, __ATOMIC_ACQ_REL,
__ATOMIC_RELAXED);
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);

View File

@ -15229,7 +15229,7 @@ typedef bool atomic_type;
atomic_type c1;
atomic_type c2;
atomic_type c3(0);
__atomic_fetch_add(&c1, c2, __ATOMIC_RELAXED);
// N.B. __atomic_fetch_add is not supported for bool.
__atomic_compare_exchange_n(&c1, &c2, c3, true, __ATOMIC_ACQ_REL,
__ATOMIC_RELAXED);
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);
@ -15395,7 +15395,7 @@ int main()
atomic_type c1;
atomic_type c2;
atomic_type c3(0);
__atomic_fetch_add(&c1, c2, __ATOMIC_RELAXED);
// N.B. __atomic_fetch_add is not supported for bool.
__atomic_compare_exchange_n(&c1, &c2, c3, true, __ATOMIC_ACQ_REL,
__ATOMIC_RELAXED);
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);