https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79025
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |ebotcazou at gcc dot gnu.org Resolution|--- |INVALID --- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- As Andrew said, the code has undefined behavior at run time as per ISO C so any output is acceptable. Compile it with -fwrapv to work around the problem.