This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/19637] Missed VRP and FRE opportunities in the presence of casts
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Oct 2005 09:56:11 -0000
- Subject: [Bug tree-optimization/19637] Missed VRP and FRE opportunities in the presence of casts
- References: <bug-19637-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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