https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93764
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |FIXED --- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Richard Biener from comment #7) > r &= ((* (unsigned long *) p) == 128); > > this one misses the may-alias type. You can't read a char * stored value > via a unsigned long * But doesn't the union contain unsigned long a[2]; unsigned char b[16]; members? Sure, from strict C POV it is invalid in any case, as it doesn't support punning through unions and u.b is the last written union member. So, for type punning through union, do we require that if the last written member of the union is not of the type we want to read through, the access must be with the union in the access path?