diff mbox

[lra] a path to fix GCC crash on s390

Message ID 4F46B495.6030609@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov Feb. 23, 2012, 9:50 p.m. UTC
The following patch fixes a compiler crash on s390 during the 
bootstrap.   Unfortunately it is not enough to fix the current s390 
bootstrap failure.

The patch was successfully bootstrapped on x86/x86-64.

Committed as rev. 184524.

2012-02-23  Vladimir Makarov <vmakarov@redhat.com>

         * lra-constraints.c (inherit_in_ebb): Don't do inheritance from
         output of a jump.
diff mbox

Patch

Index: lra-constraints.c
===================================================================
--- lra-constraints.c	(revision 184510)
+++ lra-constraints.c	(working copy)
@@ -4363,8 +4363,9 @@  inherit_in_ebb (rtx head, rtx tail)
 	{
 	  reloads_num++;
 	  /* 'original_pseudo <- reload_pseudo'.  */
-	  if (inherit_reload_reg (true, false, dst_regno, cl,
-				  curr_insn, next_usage_insns))
+	  if (! JUMP_P (curr_insn)
+	      && inherit_reload_reg (true, false, dst_regno, cl,
+				     curr_insn, next_usage_insns))
 	    change_p = true;
 	  /* Invalidate.  */
 	  usage_insns[dst_regno].check = 0;
@@ -4425,9 +4426,11 @@  inherit_in_ebb (rtx head, rtx tail)
 		/* Invalidate.  */
 		usage_insns[dst_regno].check = 0;
 	      }
-	  for (i = 0; i < to_inherit_num; i++)
-	    if (inherit_reload_reg (true, false, to_inherit[i].regno, ALL_REGS,
-				    curr_insn, to_inherit[i].insns))
+	  if (! JUMP_P (curr_insn))
+	    for (i = 0; i < to_inherit_num; i++)
+	      if (inherit_reload_reg (true, false, to_inherit[i].regno,
+				      ALL_REGS, curr_insn,
+				      to_inherit[i].insns))
 	      change_p = true;
 	  if (CALL_P (curr_insn))
 	    calls_num++;