https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105994
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Since bar and foo are not the same/compatible types this violates aliasing rules. They might be layout compatible but they are compatible. Two different things. Also