According to http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00999.html on Nov 19, 2009, Richard Guenther wrote: > On Thu, Nov 19, 2009 at 4:05 AM, Alexandre Oliva wrote: >> On Nov 17, 2009, Richard Guenther wrote: >> >>>>> This looks odd.  SSA DEF operand iteration should walk the PHI defs >>>>> as well, so the change should not be necessary. >> >>>> I thought so, too, but by the time we get there, the operands of the PHI >>>> stmt have already been disconnected. >> >>> It shouldn't be.  Please try to figure out why instead. >> >> Gotta use a different FOR_EACH macro to handle PHI nodes. >> >> s/FOR_EACH_SSA_DEF_OPERAND/FOR_EACH_PHI_OR_STMT_DEF/ fixed it. >> >> In order to make sure no other such mistakes had been made in GCC, I >> added an assertion check in the iterator initializer and adjusted the >> uses of GIMPLE_PHI nodes that triggered the assertion, but that would >> have done nothing whatsoever in its absence.  I haven't looked into >> whether doing nothing is correct. >> >> Should I check this in? > I think we should rather let num_ssa_operands and delink_stmt_imm_use > ICE on PHIs, but I'd rather do this in stage1 - can you queue this > patch until then? You meant 4.6 stage1, but I missed it. How's it for 4.7 stage1? Regstrapped on x86_64-linux-gnu and i686-linux-gnu.