This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31981] Missed forw prop with indirect ref and addr.
- 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: 24 May 2007 10:09:07 -0000
- Subject: [Bug tree-optimization/31981] Missed forw prop with indirect ref and addr.
- References: <bug-31981-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2007-05-24 11:09 -------
Actually this is just a tree-combining issue. CCP already transforms this to
c_1 = &b.t[0];
D.2000_3 = i_2(D) * 4;
D.2001_4 = (int *) D.2000_3;
D.2002_5 = D.2001_4 + &b.t[0];
*D.2002_5 = 1;
not combining D.2001_4 + &b.t[0]. There is nothing forwprop can do about this
with the existing framework, but of course it can be extended to propagate
OFFSET + &OBJ. Easier to do this after the pointer_plus merge.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31981