+2011-04-27 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/48772
+ * tree-ssa-pre.c (eliminate): Update call stmts after elimination
+ only.
+
2011-04-27 Richard Guenther <rguenther@suse.de>
* tree-ssa-alias.c (indirect_refs_may_alias_p): Fix
+2011-04-27 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/48772
+ * g++.dg/pr48772.C: New testcase.
+
2011-04-27 Jakub Jelinek <jakub@redhat.com>
PR c/48742
eliminate (void)
{
VEC (gimple, heap) *to_remove = NULL;
+ VEC (gimple, heap) *to_update = NULL;
basic_block b;
unsigned int todo = 0;
gimple_stmt_iterator gsi;
}
gimple_call_set_fn (stmt, fn);
- update_stmt (stmt);
+ VEC_safe_push (gimple, heap, to_update, stmt);
/* When changing a call into a noreturn call, cfg cleanup
is needed to fix up the noreturn call. */
}
VEC_free (gimple, heap, to_remove);
+ /* We cannot update call statements with virtual operands during
+ SSA walk. This might remove them which in turn makes our
+ VN lattice invalid. */
+ FOR_EACH_VEC_ELT (gimple, to_update, i, stmt)
+ update_stmt (stmt);
+ VEC_free (gimple, heap, to_update);
+
return todo;
}