diff mbox

Restore simple control flow in probe_stack_range

Message ID 201205301051.36687.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou May 30, 2012, 8:51 a.m. UTC
It apparently got changed when the conversion to the new create_input_operand 
interface was done.  This restores the simple control flow of 4.6.x and stops 
the compiler when the probe cannot be generated if HAVE_check_stack, instead 
of silently dropping it (but no architectures HAVE_check_stack so...).

Tested on i586-suse-linux, applied on the mainline and 4.7 branch as obvious.


2012-05-30  Eric Botcazou  <ebotcazou@adacore.com>

	* explow.c (probe_stack_range): Restore simple control flow and stop
	again when the probe cannot be generated if HAVE_check_stack.
diff mbox

Patch

Index: explow.c
===================================================================
--- explow.c	(revision 187922)
+++ explow.c	(working copy)
@@ -1579,12 +1579,11 @@  probe_stack_range (HOST_WIDE_INT first,
 								size, first)));
       emit_library_call (stack_check_libfunc, LCT_NORMAL, VOIDmode, 1, addr,
 			 Pmode);
-      return;
     }
 
   /* Next see if we have an insn to check the stack.  */
 #ifdef HAVE_check_stack
-  if (HAVE_check_stack)
+  else if (HAVE_check_stack)
     {
       struct expand_operand ops[1];
       rtx addr = memory_address (Pmode,
@@ -1592,10 +1591,10 @@  probe_stack_range (HOST_WIDE_INT first,
 					         stack_pointer_rtx,
 					         plus_constant (Pmode,
 								size, first)));
-
+      bool success;
       create_input_operand (&ops[0], addr, Pmode);
-      if (maybe_expand_insn (CODE_FOR_check_stack, 1, ops))
-	return;
+      success = maybe_expand_insn (CODE_FOR_check_stack, 1, ops);
+      gcc_assert (success);
     }
 #endif