re PR tree-optimization/51481 (ice: dead STMT in EH table)
authorRichard Guenther <rguenther@suse.de>
Tue, 13 Dec 2011 12:56:09 +0000 (12:56 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 13 Dec 2011 12:56:09 +0000 (12:56 +0000)
2011-12-13  Richard Guenther  <rguenther@suse.de>

PR middle-end/51481
* tree-cfg.c (replace_uses_by): Pass proper arguments to
maybe_clean_or_replace_eh_stmt.

From-SVN: r182280

gcc/ChangeLog
gcc/tree-cfg.c

index df45f4448c47b7cef9c03e68db2d1ddaee42a74e..a0e3707bcb2e482417d9a4450e9b14dddbf7e8dc 100644 (file)
@@ -1,3 +1,9 @@
+2011-12-13  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/51481
+       * tree-cfg.c (replace_uses_by): Pass proper arguments to
+       maybe_clean_or_replace_eh_stmt.
+
 2011-12-13  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/51519
index d81cc670bf4f55c9dcd1e48733d25702291d2729..db10daf6abc7da55bb2711ed2f22504521f6a499 100644 (file)
@@ -1601,6 +1601,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 +1620,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);
        }
     }