PR libstdc++/85930 fix misaligned reference
authorJonathan Wakely <jwakely@redhat.com>
Mon, 4 Jun 2018 16:07:35 +0000 (17:07 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 4 Jun 2018 16:07:35 +0000 (17:07 +0100)
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
libstdc++-v3/include/bits/shared_ptr_base.h

index 88e7c6dce515eba1caf32404bc8841beb33aef16..78a9f7fa072500975a98b0e51cefb1dcb59d43cd 100644 (file)
@@ -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
index b58273a79c52fcceff4ea1791937a3ca07cef683..22cb7eb46b1627db5b6846438f09eb0138dd7a5f 100644 (file)
@@ -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