https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124261
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> ---
So if we thread the blocks we do the right thing:
```
struct a {int a, b,c,d,e,g;};
struct a ret();
void h();
int
test (int o)
{
struct a aa,cc;
struct a *bb = o ? &aa : &cc;
int *p = o ? &aa.b : &cc.b;
int *q = o ? &aa.a : &cc.a;
*bb = ret ();
*p = 12345;
*q = 0;
int t = *p;
if (o) h();
return t;
}
```
I wonder if we could do phiprop for stores. That would fix the orginal case I
think. But maybe there is some more complex case that makes a difference
though.