[Bug middle-end/92059] Crash on tr2::dynamic_bitset::operator=() with optimization
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Oct 11 00:16:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92059
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to John Harris from comment #2)
> I figured this out. The assignment operator doesn't have a return statement.
> Why that matters, I don't know. But adding return *this fixes it.
Because if you fallthrough to the end without a return, it is undefined. Newer
GCC's changed the behavior there.
More information about the Gcc-bugs
mailing list