https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89567
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement --- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- IPA-SRA does handle this if the function is static. Also mod-ref handles this if the function takes a pointer instead of a struct. Aka: ``` struct two_ints { int x, y; }; __attribute__((noinline)) int foo2(struct two_ints *s) { return s->x; } int bar2(int* a) { struct two_ints ti = { a[5], a[10] }; int b = foo2(&ti); return b * b; } ``` The store to ti.x is only there now. I am think this can be closed as fixed ...