diff options
author | xndcn <xndchn@gmail.com> | 2024-02-16 11:00:13 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2024-03-14 15:06:47 +0000 |
commit | 0adc8c5f146b108f99c4df09e43276e3a2419262 (patch) | |
tree | 045d191608b20e4213e122066c223f372bb688aa /libstdc++-v3/include | |
parent | 38958ac987dc3e6162e2ddaba3c7e7f41381e079 (diff) | |
download | gcc-0adc8c5f146b108f99c4df09e43276e3a2419262.zip gcc-0adc8c5f146b108f99c4df09e43276e3a2419262.tar.gz gcc-0adc8c5f146b108f99c4df09e43276e3a2419262.tar.bz2 |
libstdc++: Add missing clear_padding in __atomic_float constructor
For 80-bit long double we need to clear the padding bits on
construction.
libstdc++-v3/ChangeLog:
* include/bits/atomic_base.h (__atomic_float::__atomic_float(Fp)):
Clear padding.
* testsuite/29_atomics/atomic_float/compare_exchange_padding.cc:
New test.
Signed-off-by: xndcn <xndchn@gmail.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/bits/atomic_base.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h index b857b44..dd36030 100644 --- a/libstdc++-v3/include/bits/atomic_base.h +++ b/libstdc++-v3/include/bits/atomic_base.h @@ -1283,7 +1283,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr __atomic_float(_Fp __t) : _M_fp(__t) - { } + { __atomic_impl::__clear_padding(_M_fp); } __atomic_float(const __atomic_float&) = delete; __atomic_float& operator=(const __atomic_float&) = delete; |