https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111050

--- Comment #6 from TC <rs2740 at gmail dot com> ---
The crash is gone if lib2.o is compiled with bits/hashtable_policy.h patched
like so:

--- a/path/to/gcc-13/include/c++/13.2.0/bits/hashtable_policy.h
+++ b/hashtable_policy.h
@@ -327,18 +327,22 @@ namespace __detail

       __gnu_cxx::__aligned_buffer<_Value> _M_storage;

+      [[__gnu__::__always_inline__]]
       _Value*
       _M_valptr() noexcept
       { return _M_storage._M_ptr(); }

+      [[__gnu__::__always_inline__]]
       const _Value*
       _M_valptr() const noexcept
       { return _M_storage._M_ptr(); }

+      [[__gnu__::__always_inline__]]
       _Value&
       _M_v() noexcept
       { return *_M_valptr(); }

+      [[__gnu__::__always_inline__]]
       const _Value&
       _M_v() const noexcept
       { return *_M_valptr(); }

I'm following up with my reporter to see if this also fixes the problem with
their actual code.

Reply via email to