This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bootstrap with -O9 fails on alpha


On Aug 22, 2000, Alexandre Oliva <aoliva@redhat.com> wrote:

> On Aug 22, 2000, Alexandre Oliva <aoliva@redhat.com> wrote:
>> Is the patch below the right way to fix the problem?

> I hope it isn't, because it's not enough to fix the problem :-(

Fortunately, there is (apparently) only one other call site that may
violate the assertion, so here's a patch that fixes both of them.  Ok
to install (if bootstrap completes)?

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* calls.c (check_sibcall_argument_overlap_1): Adjust for
	ARGS_GROW_DOWNWARD.
	(check_sibcall_argument_overlap): Likewise.

	* simplify-rtx.c (simplify_rtx): Don't pass VOIDmode to
	simplify_relational_operation() unless both operands are of
	VOIDmode.
	* cse.c (fold_rtx): Likewise.

Index: gcc/simplify-rtx.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/simplify-rtx.c,v
retrieving revision 1.24
diff -u -p -r1.24 simplify-rtx.c
--- gcc/simplify-rtx.c	2000/08/04 20:28:06	1.24
+++ gcc/simplify-rtx.c	2000/08/22 09:37:44
@@ -1694,7 +1694,7 @@ simplify_relational_operation (code, mod
   if (mode == VOIDmode
       && (GET_MODE (op0) != VOIDmode
 	  || GET_MODE (op1) != VOIDmode))
-    abort();
+    abort ();
 
   /* If op0 is a compare, extract the comparison arguments from it.  */
   if (GET_CODE (op0) == COMPARE && op1 == const0_rtx)
@@ -2091,7 +2091,10 @@ simplify_rtx (x)
 					 XEXP (x, 0), XEXP (x, 1), XEXP (x, 2));
 
     case '<':
-      return simplify_relational_operation (code, GET_MODE (XEXP (x, 0)),
+      return simplify_relational_operation (code,
+					    (GET_MODE (XEXP (x, 0)) != VOIDmode
+					     ? GET_MODE (XEXP (x, 0))
+					     : GET_MODE (XEXP (x, 1))),
 					    XEXP (x, 0), XEXP (x, 1));
     default:
       return NULL;
Index: gcc/cse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cse.c,v
retrieving revision 1.151
diff -u -p -r1.151 cse.c
--- gcc/cse.c	2000/08/17 23:03:43	1.151
+++ gcc/cse.c	2000/08/22 09:37:47
@@ -3858,7 +3858,17 @@ fold_rtx (x, insn)
 	    }
 	}
 
-      new = simplify_relational_operation (code, mode_arg0,
+      new = simplify_relational_operation (code,
+					   ((GET_MODE (const_arg0
+						       ? const_arg0
+						       : folded_arg0)
+					     != VOIDmode)
+					    ? GET_MODE (const_arg0
+							? const_arg0
+							: folded_arg0)
+					    : GET_MODE (const_arg1
+							? const_arg1
+							: folded_arg1)),
 					   const_arg0 ? const_arg0 : folded_arg0,
 					   const_arg1 ? const_arg1 : folded_arg1);
 #ifdef FLOAT_STORE_FLAG_VALUE

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]