[Bug tree-optimization/123596] [13/14/15/16 regression] ICE in tree check: expected ssa_name, have var_decl in unlink_stmt_vdef, at tree-ssa-operands.cc:1387 with -O2 flag

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 29 09:39:51 GMT 2026


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
So this is because sink_clobbers does not update virtual SSA form in all cases:

      /* If there isn't a single predecessor but no virtual PHI node
         arrange for virtual operands to be renamed.  */
      else if (!single_pred_p (succbb)
               && TREE_CODE (gimple_vuse (last_sunk)) == SSA_NAME)
        {
          mark_virtual_operand_for_renaming (gimple_vuse (last_sunk));
          todo |= TODO_update_ssa_only_virtuals;
        }

but this isn't really a good utility for this.  Testing a fix.


More information about the Gcc-bugs mailing list