[Bug c++/66774] Any optimization causes segfault on binary

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 6 11:04:00 GMT 2015


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to contact from comment #0)
> As the bug does not
> occur with -O0 I assume the bug is part of gcc, and not of my own code, but
> I could obviously be wrong.

This is a completely invalid assumption.

Many, many bugs appear harmless without optimisations, because "the code
appears to work correctly" is just one possible outcome of undefined behaviour,
but enabling optimisation can cause a different outcome with more obvious
symptoms.



More information about the Gcc-bugs mailing list