diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2018-06-04 17:07:35 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2018-06-04 17:07:35 +0100 |
commit | dbda636deefd3a51a33bdf1ab03de848b14b5a3d (patch) | |
tree | f9d753e8c60305e16b63e2fc6f0e4d7f793ec5e4 | |
parent | 20ce6adefb26f000e84b92cc3206e0ac85011a24 (diff) | |
download | gcc-dbda636deefd3a51a33bdf1ab03de848b14b5a3d.zip gcc-dbda636deefd3a51a33bdf1ab03de848b14b5a3d.tar.gz gcc-dbda636deefd3a51a33bdf1ab03de848b14b5a3d.tar.bz2 |
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
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/shared_ptr_base.h | 2 |
2 files changed, 7 insertions, 1 deletions
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 <jwakely@redhat.com> + + 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 <jwakely@redhat.com> 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<const type_info&>(__tag); } #endif |