https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52054
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2021-07-29 00:00:00 |2025-1-31 --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- Re-confirmed. It works with struct S { int i; int j; }; int foo (struct S *p) { struct S s = *p; if (p->i != s.i) return 1; return 0; } so it depends on which ref is seen first. When s.i is seen second upon seeing the aggregate copy we look up p->i and find it. But the other way around we don't find p->i but we also do not insert it so a later p->i lookup can find it.