https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116460

--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #14)
> (In reply to Andrew Pinski from comment #13)
> > (In reply to Andrew Pinski from comment #8)
> > > ./a.ltrans6.ltrans.212t.forwprop4
> > > 
> > > Removing dead stmt noDataCandVec$_M_start_888 = PHI <_1783(176), 
> > > _577(186)>
> > > ...
> > > Removing dead stmt:_598 = _888 + 16;
> > > 
> > > So it looks like we remove the statement defining _888 and then removing 
> > > the
> > > use.
> > > The removal of _888 happens directly from forwprop while _598 definition
> > > removal comes from simple_dce_from_worklist .
> > > 
> > > The ICE happens because the ssa name _888 has already been freed so the 
> > > type
> > > is null (and not in this case a pointer) since this was originally a 
> > > pointer
> > > plus.
> > > 
> > > Trying to reduce this further.
> > 
> > _888 definition is from a BB which is going to be removed so we should not
> > need to mark its uses as being needed for dce worklist. But I am not sure
> > how to detect that case.
> 
> forwprop shouldn't remove _888 if there's a use left.  When adding
> simple_dce_from_worklist, did you remove some manual stmt removal
> (adding to to_remove)?  Having both is a bit ugly (see also
> remove_prop_source_from_use), but the sets need to be separate to
> avoid interactions like this.

Richard, you are the one who added simple_dce_from_worklist to forwprop in the
end; I had tried originally by not do the manual one but ran into regressions
so I didn't submit it.

Reply via email to