https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112409
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I have to double check but I am 99% sure this code is undefined due to alias violations. Use either memcpy or -fno-strict-aliasing.