mirror of git://gcc.gnu.org/git/gcc.git
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:
parent
d5ec69f374
commit
d2aee115cc
|
|
@ -1,5 +1,10 @@
|
||||||
2016-04-05 Jonathan Wakely <jwakely@redhat.com>
|
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.
|
* testsuite/30_threads/thread/70503.cc: Require -static to work.
|
||||||
|
|
||||||
PR libstdc++/70503
|
PR libstdc++/70503
|
||||||
|
|
|
||||||
|
|
@ -3290,7 +3290,7 @@ AC_DEFUN([GLIBCXX_ENABLE_ATOMIC_BUILTINS], [
|
||||||
atomic_type c1;
|
atomic_type c1;
|
||||||
atomic_type c2;
|
atomic_type c2;
|
||||||
atomic_type c3(0);
|
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_compare_exchange_n(&c1, &c2, c3, true, __ATOMIC_ACQ_REL,
|
||||||
__ATOMIC_RELAXED);
|
__ATOMIC_RELAXED);
|
||||||
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);
|
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);
|
||||||
|
|
@ -3375,7 +3375,7 @@ int main()
|
||||||
atomic_type c1;
|
atomic_type c1;
|
||||||
atomic_type c2;
|
atomic_type c2;
|
||||||
atomic_type c3(0);
|
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_compare_exchange_n(&c1, &c2, c3, true, __ATOMIC_ACQ_REL,
|
||||||
__ATOMIC_RELAXED);
|
__ATOMIC_RELAXED);
|
||||||
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);
|
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);
|
||||||
|
|
|
||||||
|
|
@ -15229,7 +15229,7 @@ typedef bool atomic_type;
|
||||||
atomic_type c1;
|
atomic_type c1;
|
||||||
atomic_type c2;
|
atomic_type c2;
|
||||||
atomic_type c3(0);
|
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_compare_exchange_n(&c1, &c2, c3, true, __ATOMIC_ACQ_REL,
|
||||||
__ATOMIC_RELAXED);
|
__ATOMIC_RELAXED);
|
||||||
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);
|
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);
|
||||||
|
|
@ -15395,7 +15395,7 @@ int main()
|
||||||
atomic_type c1;
|
atomic_type c1;
|
||||||
atomic_type c2;
|
atomic_type c2;
|
||||||
atomic_type c3(0);
|
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_compare_exchange_n(&c1, &c2, c3, true, __ATOMIC_ACQ_REL,
|
||||||
__ATOMIC_RELAXED);
|
__ATOMIC_RELAXED);
|
||||||
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);
|
__atomic_test_and_set(&c1, __ATOMIC_RELAXED);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue