https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96293
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Your testcase is invalid, so it certainly deserves a warning. One thing is that e.g. the int member is at offset 4, which is a multiple of sizeof (int), but that doesn't help when the structure has alignment of 1 due to packed, at which point the s variable doesn't have any alignment guarantees, so (uintptr_t) &s.d % sizeof (int) can be any value from 0 to sizeof (int) - 1.