------- Comment #8 from rguenth at gcc dot gnu dot org 2005-10-09 09:56 ------- Another one is the following (without any possible aliasing problems):
int foo_charchar(void) { char i[2*sizeof(int)]; new (i) Foo(); return reinterpret_cast<Foo*>(&i[0])->i[0]; } where we miss the FRE opportunity for the cast: <bb 0>: iftmp.0 = (struct Foo *) &i[0]; iftmp.0->i[0] = 1; D.2097 = (struct Foo *) &i[0]; return D.2097->i[0]; -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Missed constant propagation |Missed VRP and FRE |with placement new |opportunities in the | |presence of casts http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19637