+2016-10-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/77988
+ * tree-vrp.c (remove_range_assertions): Use replace_uses_by.
+
2016-10-17 Marek Polacek <polacek@redhat.com>
* Makefile.in (C_COMMON_OBJS): Add c-family/c-attribs.o.
+2016-10-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/77988
+ * gcc.dg/torture/pr77988.c: New testcase.
+
2016-10-17 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* gcc.dg/pr71636-1.c: New test-case.
for (si = gsi_after_labels (bb), is_unreachable = -1; !gsi_end_p (si);)
{
gimple *stmt = gsi_stmt (si);
- gimple *use_stmt;
if (is_gimple_assign (stmt)
&& gimple_assign_rhs_code (stmt) == ASSERT_EXPR)
tree lhs = gimple_assign_lhs (stmt);
tree rhs = gimple_assign_rhs1 (stmt);
tree var;
- use_operand_p use_p;
- imm_use_iterator iter;
var = ASSERT_EXPR_VAR (rhs);
}
/* Propagate the RHS into every use of the LHS. */
- FOR_EACH_IMM_USE_STMT (use_stmt, iter, lhs)
- {
- FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
- SET_USE (use_p, var);
- update_stmt (use_stmt);
- }
+ replace_uses_by (lhs, var);
/* And finally, remove the copy, it is not needed. */
gsi_remove (&si, true);