From 324118378e4e26d9c0f86734af26538491c5c5fc Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Fri, 2 Oct 2020 22:14:06 +0100 Subject: [PATCH] libstdc++: Change test to work without 64-bit atomics This fixes a linker error for older ARM cores without 64-bit atomics. I think the { dg-add-options libatomic } is no longer needed, but it's harmless to keep it there. libstdc++-v3/ChangeLog: * testsuite/29_atomics/atomic_float/value_init.cc: Use float instead of double so that __atomic_load_8 isn't needed. --- libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc b/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc index 38af9bdc8d4..dd8114d6034 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc @@ -22,13 +22,13 @@ #include #include -constexpr std::atomic a; +constexpr std::atomic a; void test01() { VERIFY(a.load() == 0); - static_assert(std::is_nothrow_default_constructible_v>); + static_assert(std::is_nothrow_default_constructible_v>); } int -- 2.30.2