This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Fix ICE related to ADDR_EXPR forward propagation


On Sat, 2005-05-21 at 09:22 -0400, Daniel Berlin wrote:
> On Fri, 2005-05-20 at 07:17 -0600, Jeffrey A Law wrote:
> > On Fri, 2005-05-20 at 07:12 -0400, Daniel Berlin wrote:
> > > On Fri, 2005-05-20 at 07:23 +0100, Richard Sandiford wrote:
> > > > Mainline currently segfaults while trying to build newlib's hash.c.
> > > > The problem seems to be caused by the recent patch to forward-propagate
> > > > ADDR_EXPRs.  The idea of those changes is to replace:
> > > > 
> > > >     t1 = &thing[0]
> > > >     t2 = index * scale
> > > >     t3 = (ptr_type) t2
> > > >     result = t1 + t3
> > > > 
> > > > with:
> > > > 
> > > >     result = &thing[index]
> > > 
> > > 
> > > >   I'm not exactly 100%
> > > > confident this will be accepted as the right fix though. ;)
> > > 
> > > 
> > > You want to call recompute_tree_invariant_for_addr_expr on the ADDR_EXPR
> > > after the operands are replaced.
> > > 
> > > It'll do what it says (recompute the invariant flag, etc, as
> > > approriate).
> > Andrew Pinski has a patch for that -- I've twiddled it slightly
> > (moved it into the cleanup routine
> > recently added by RTH).
> 
> Yeah, i had sent him a patch that actually adds verification of
> ADDR_EXPR updates (IE during verify_stmt, it calls
> recompute_tree_invariant_for_addr_expr and makes sure nothing changes),
> which he was using to track these down.
> 
> The patch to do the verification is attached to a bug these days, i
> don't remember which :)
I'll hunt it down tonight when I check in the changes to forwprop.c.

[ The PCH weirdness was due to a new kernel which changed how one
  turns off address space randomization.  Grrr. ]

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]