diff mbox

Fix glitch in replace_stmt_with_simplification

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

Commit Message

Richard Biener Dec. 4, 2014, 12:27 p.m. UTC
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2014-12-04  Richard Biener  <rguenther@suse.de>

	* gimple-fold.c (replace_stmt_with_simplification): Properly
	fail when maybe_push_res_to_seq fails.
diff mbox

Patch

Index: gcc/gimple-fold.c
===================================================================
--- gcc/gimple-fold.c	(revision 218343)
+++ gcc/gimple-fold.c	(working copy)
@@ -3345,8 +3408,9 @@  replace_stmt_with_simplification (gimple
       if (gimple_has_lhs (stmt))
 	{
 	  tree lhs = gimple_get_lhs (stmt);
-	  maybe_push_res_to_seq (rcode, TREE_TYPE (lhs),
-				 ops, seq, lhs);
+	  if (!maybe_push_res_to_seq (rcode, TREE_TYPE (lhs),
+				      ops, seq, lhs))
+	    return false;
 	  if (dump_file && (dump_flags & TDF_DETAILS))
 	    {
 	      fprintf (dump_file, "gimple_simplified to ");