[Bug bootstrap/49344] ICE in tree-flow-inline.h:745 while bootstrap

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 9 15:14:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49344

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-09 15:13:18 UTC ---
Sounds a bit strange.  It must be (my tree doesn't match the lines exactly):

          /* Make sure the negate statement becomes dead with this
             single transformation.  */
          if (!single_imm_use (gimple_assign_lhs (use_stmt),
                               &use_p, &neguse_stmt))
            return false;

          /* Make sure the multiplication isn't also used on that stmt.  */
          FOR_EACH_SSA_TREE_OPERAND (use, neguse_stmt, iter, SSA_OP_USE)
            if (use == mul_result)
              return false;

"guessed patch":

Index: gcc/tree-ssa-math-opts.c
===================================================================
--- gcc/tree-ssa-math-opts.c    (revision 174845)
+++ gcc/tree-ssa-math-opts.c    (working copy)
@@ -2174,7 +2174,7 @@ convert_mult_to_fma (gimple mul_stmt, tr
       if (use_code == NEGATE_EXPR)
        {
          ssa_op_iter iter;
-         tree use;
+         use_operand_p usep;

          result = gimple_assign_lhs (use_stmt);

@@ -2185,8 +2185,8 @@ convert_mult_to_fma (gimple mul_stmt, tr
            return false;

          /* Make sure the multiplication isn't also used on that stmt.  */
-         FOR_EACH_SSA_TREE_OPERAND (use, neguse_stmt, iter, SSA_OP_USE)
-           if (use == mul_result)
+         FOR_EACH_PHI_OR_STMT_USE (usep, neguse_stmt, iter, SSA_OP_USE)
+           if (USE_FROM_PTR (usep) == mul_result)
              return false;

          /* Re-validate.  */



More information about the Gcc-bugs mailing list