https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83703
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The compiler optimizes with the assumption that undefined behavior doesn't
happen (i.e. it compiles valid programs), so if you have UB in your code, all
bets are off, it can do anything.