This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31146] forwprop does not look through 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: 12 Mar 2007 16:01:03 -0000
- Subject: [Bug tree-optimization/31146] forwprop does not look through casts
- References: <bug-31146-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from rguenth at gcc dot gnu dot org 2007-03-12 16:01 -------
Well sure - if we then would get
int *p_1 = &a[0];
void *q_1 = (void *)p_1;
int *r_1 = (int *)q_1;
if (r_1 != NULL)
...
then FRE would figure out that r_1 == p_1 and the forwprop pass after FRE will
fold the comparison.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31146