https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88719
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> --- This is not a bug but undefined behavior as you have an alias violation; even though you have an union there. if (**g = 0) ; else if (*e) --h; You store via long int but load via short int. Since you don't type pune through the union type but rather the base types; this is undefined behavior.