]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Change test to work without 64-bit atomics
authorJonathan Wakely <jwakely@redhat.com>
Fri, 2 Oct 2020 21:14:06 +0000 (22:14 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 24 Nov 2020 23:57:58 +0000 (23:57 +0000)
This fixes a linker error for older ARM cores without 64-bit atomics.

libstdc++-v3/ChangeLog:

* testsuite/29_atomics/atomic_float/value_init.cc: Use float
instead of double so that __atomic_load_8 isn't needed.

(cherry picked from commit 324118378e4e26d9c0f86734af26538491c5c5fc)

libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc

index 237c0dd13ed5aa455b8232b9496306b53f6f7e17..98c6b0c7d0158e6cf3258b16ea2dac1d3760aad6 100644 (file)
 #include <atomic>
 #include <testsuite_hooks.h>
 
-constexpr std::atomic<double> a;
+constexpr std::atomic<float> a;
 
 void
 test01()
 {
   VERIFY(a.load() == 0);
-  static_assert(std::is_nothrow_default_constructible_v<std::atomic<double>>);
+  static_assert(std::is_nothrow_default_constructible_v<std::atomic<float>>);
 }
 
 int