This is the mail archive of the 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: Removing unnecessary ADDR_EXPRs

On Tue, 2005-05-17 at 22:29 +0200, Richard Guenther wrote:
> On 5/17/05, Jeffrey A Law <> wrote:
> > On Tue, 2005-05-17 at 21:42 +0200, Richard Guenther wrote:
> > > On 5/17/05, Jeffrey A Law <> wrote:
> > > > Can you dump the types of the outer INDIRECT_REF, the ADDR_EXPR and
> > > > the first argument to the ADDR_EXPR?    The only way I can see folding
> > > > failing is if there's a type bogosity somewhere.  I've instrumented that
> > > > code locally, but haven't managed to make it trip yet.
> > >
> > > Sorry to followup again, but I suppose I merely trigger a latent bug elsewhere.
> > > Actually, during rewrite_into_ssa we call parse_ssa_operands on
> > > (&<retval>)->_M_stateD.32454 = __stD.41263 which finally calls
> > > get_indirect_ref_operands with the above stmt and expr = *&<retval>
> > > It isn't expecting an expr of this form, unfortunately.  So it looks something
> > > before rewrite_into_ssa is producing non-gimple?  Actually changing all
> > > fold_indirect_ref in tree-inline.c to fold_indirect_ref_rhs fixes the problem.
> > 
> > Hmmm, we might be better off if you can send me whatever tweaks you've
> > got in your tree.  There's most likely a type issue somewhere that's
> > causing these problems, but it's going to be bloody hard to find via
> > email :-)
> I have installed the patch contained in
> and the one referenced therein (which is the one that causes
> the failure).
> Effectively using fold_indirect_ref_rhs from the first patch in all
> places tree-inline.c now uses fold-const.cs fold_indirect_ref fixes
> the issue.  As we do not re-gimplify after inlining, a failure to
> fold is fatal.
I've been able to reproduce this and I'm poking at a couple fixes.

I would recommend you continue to root out the mismatches types
though -- they'll prevent optimization and if they're clearly
wrong, then, well fixing them would be a good thing.


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