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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> I suspect without a testcase it is going to be hard to reproduce this.

No, it's entirely expected. The std::logic_error and std::runtime_error classes
always use a reference counted string type even when std::string is a typedef
for the non-reference counted std::__cxx11::basic_string<char>.

This is one of many reasons that building libstdc++ with LTO is not supported,
and will probably break.

I have some ideas for using a separate ref-counted string type in the
exceptions, so that it's neither the COW std::basic_string nor the __cow_string
kluge, but it's not a priority.

Reply via email to