[gcc r11-3585] libstdc++: Fix test_and_acquire for EABI
Jonathan Wakely
redi@gcc.gnu.org
Thu Oct 1 11:54:58 GMT 2020
https://gcc.gnu.org/g:026ca1121c2f4514494c10860ef3c49f18eccf9d
commit r11-3585-g026ca1121c2f4514494c10860ef3c49f18eccf9d
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Oct 1 12:54:37 2020 +0100
libstdc++: Fix test_and_acquire for EABI
libstdc++-v3/ChangeLog:
* config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
Do not try to dereference return value of __atomic_load_n.
Diff:
---
libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h b/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h
index 4fb34869f8a..a08afed7d21 100644
--- a/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h
+++ b/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h
@@ -48,7 +48,7 @@ namespace __cxxabiv1
typedef int __guard;
#define _GLIBCXX_GUARD_TEST_AND_ACQUIRE(x) \
- _GLIBCXX_GUARD_TEST(__atomic_load_n(x, __ATOMIC_ACQUIRE))
+ ((__atomic_load_n(x, __ATOMIC_ACQUIRE) & 1) != 0)
#define _GLIBCXX_GUARD_SET_AND_RELEASE(x) \
__atomic_store_n(x, 1, __ATOMIC_RELEASE)
More information about the Libstdc++-cvs
mailing list