This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 13 Dec 2011 11:24:44 +0000
- Subject: [Bug tree-optimization/51481] [4.7 Regression] ice: dead STMT in EH table
- Auto-submitted: auto-generated
- References: <bug-51481-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51481
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-13 11:24:44 UTC ---
The following is a real fix I'm going to test.
@@ -1601,6 +1605,7 @@ replace_uses_by (tree name, tree val)
if (gimple_code (stmt) != GIMPLE_PHI)
{
gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
+ gimple orig_stmt = stmt;
size_t i;
fold_stmt (&gsi);
@@ -1619,7 +1624,7 @@ replace_uses_by (tree name, tree val)
recompute_tree_invariant_for_addr_expr (op);
}
- maybe_clean_or_replace_eh_stmt (stmt, stmt);
+ maybe_clean_or_replace_eh_stmt (orig_stmt, stmt);
update_stmt (stmt);
}
}