From dbda636deefd3a51a33bdf1ab03de848b14b5a3d Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 4 Jun 2018 17:07:35 +0100 Subject: [PATCH] PR libstdc++/85930 fix misaligned reference PR libstdc++/85930 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align the static variable correctly. From-SVN: r261155 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/bits/shared_ptr_base.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 88e7c6d..78a9f7f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2018-06-04 Jonathan Wakely + + PR libstdc++/85930 + * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align + the static variable correctly. + 2018-05-24 Jonathan Wakely PR libstdc++/78870 support std::filesystem on Windows diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h index b58273a..22cb7eb 100644 --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -516,7 +516,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static const type_info& _S_ti() noexcept { - static constexpr _Sp_make_shared_tag __tag; + static constexpr alignas(type_info) _Sp_make_shared_tag __tag; return reinterpret_cast(__tag); } #endif -- 2.7.4