https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110530
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This code is undefined for 2 reasons. First is unsigned int and unsigned long are 2 different sizes on LP64 targets (x86_64-linux-gnu is one of those, while windows is not). Second is if they are the same size, then there is an aliasing violation in that you cannot do a store as an `unsigned long` and then do a load from that same location as an `unsigned int` as C says those 2 types don't alias. -fsanitize=address will catch the first reason.