mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 11:27:28 -03:00
build: Fix false positive CHECK_ATOMIC
test for clang-15
Github-Pull: #29859
Rebased-From: dd3e0fa125
This commit is contained in:
parent
9277793b4e
commit
364bf01ff2
1 changed files with 5 additions and 2 deletions
|
@ -7,7 +7,7 @@ dnl warranty.
|
|||
# Clang, when building for 32-bit,
|
||||
# and linking against libstdc++, requires linking with
|
||||
# -latomic if using the C++ atomic library.
|
||||
# Can be tested with: clang++ test.cpp -m32
|
||||
# Can be tested with: clang++ -std=c++20 test.cpp -m32
|
||||
#
|
||||
# Sourced from http://bugs.debian.org/797228
|
||||
|
||||
|
@ -27,8 +27,11 @@ m4_define([_CHECK_ATOMIC_testbody], [[
|
|||
auto t1 = t.load();
|
||||
t.compare_exchange_strong(t1, 3s);
|
||||
|
||||
std::atomic<int64_t> a{};
|
||||
std::atomic<double> d{};
|
||||
d.store(3.14);
|
||||
auto d1 = d.load();
|
||||
|
||||
std::atomic<int64_t> a{};
|
||||
int64_t v = 5;
|
||||
int64_t r = a.fetch_add(v);
|
||||
return static_cast<int>(r);
|
||||
|
|
Loading…
Reference in a new issue