https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94053
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The code is undefined so both behaviors are fine. Note address sanitizer will dect this at runtime.