http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54735
--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-10-02 13:03:07 UTC --- Actually that just papers over the real issue. The issue is that cfg-cleanup runs before update-ssa and that removes a basic-block (9) because we have <bb 8>: D.2778 ={v} {CLOBBER}; if (1 == 0) goto <bb 9>; else goto <bb 33>; <bb 9>: # .MEM_62 = VDEF <.MEM_60> D.2632.m_col = 0; <bb 10>: # VUSE <.MEM_62> __assert_fail (0); but as you can see this removes the definition for .MEM_62! That is what confuses update-SSA (rightfully so - it re-assigns .MEM_62 to the inserted PHI node). Which means we need to update virtual SSA form right here, before calling cfgcleanup.