https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116460
--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (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.