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); } }