https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70143
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- The warning is "correct". You are accessing object *ap (a struct a) via a pointer to struct b. That ap really points to a b is something the FE code doesn't know at this point. I'll see if we can somehow make the FE code "smarter".