diff mbox

[match-and-simplify] Fix ICE with updating EH info

Message ID alpine.LSU.2.11.1408061550250.20733@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Aug. 6, 2014, 1:50 p.m. UTC
Wasn't done properly.

Committed.

Richard.

2014-08-06  Richard Biener  <rguenther@suse.de>

	* tree-ssa-forwprop.c (pass_forwprop::execute): Properly
	clean EH info on folded stmts.
diff mbox

Patch

Index: gcc/tree-ssa-forwprop.c
===================================================================
--- gcc/tree-ssa-forwprop.c	(revision 213651)
+++ gcc/tree-ssa-forwprop.c	(working copy)
@@ -3663,11 +3663,12 @@  pass_forwprop::execute (function *fun)
 	   !gsi_end_p (gsi); gsi_next (&gsi))
 	{
 	  gimple stmt = gsi_stmt (gsi);
+	  gimple orig_stmt = stmt;
 
 	  if (fold_stmt (&gsi, fwprop_ssa_val))
 	    {
 	      stmt = gsi_stmt (gsi);
-	      if (maybe_clean_or_replace_eh_stmt (stmt, stmt)
+	      if (maybe_clean_or_replace_eh_stmt (orig_stmt, stmt)
 		  && gimple_purge_dead_eh_edges (bb))
 		cfg_changed = true;
 	      update_stmt (stmt);