Results for egcs-2.92.23 19981122 (gcc2 ss-980609 experimental) testsuite on i386-unknown-openbsd2.4

Andreas Schwab schwab@issan.informatik.uni-dortmund.de
Fri Nov 27 02:29:00 GMT 1998


Marc Espie <espie@quatramaran.ens.fr> writes:

|> I should add that I STILL can't give you any results for 
|> m68k-unknown-openbsd2.4 as I am still running into the same wall:
|> 
|> compilation of libgcc2 by xgcc for _bb ends up with an ICE
|> in expmed.c: 2594: Internal compiler error in function choose_multiplier

This is a bug in reload, it kills the REG_UNUSED notes, which cannot be
recomputed accurately.  As a result the second stage compiler is
miscompiled (more exactly the function div_and_round_double which is
called by choose_multiplier).  Here is a patch:


1998-11-01  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

	* reload1.c (reload): Don't remove REG_UNUSED notes here, it is
	impossible in general to recompute them accurately afterwards.

--- egcs/gcc/reload1.c.~1~	Wed Nov 25 11:31:19 1998
+++ egcs/gcc/reload1.c	Fri Nov 27 10:49:58 1998
@@ -1087,7 +1087,7 @@
   reload_completed = 1;
 
   /* Make a pass over all the insns and delete all USEs which we inserted
-     only to tag a REG_EQUAL note on them.  Remove all REG_DEAD and REG_UNUSED
+     only to tag a REG_EQUAL note on them.  Remove all REG_DEAD
      notes.  Delete all CLOBBER insns and simplify (subreg (reg)) operands.  */
 
   for (insn = first; insn; insn = NEXT_INSN (insn))
@@ -1108,8 +1108,7 @@
 	pnote = &REG_NOTES (insn);
 	while (*pnote != 0)
 	  {
-	    if (REG_NOTE_KIND (*pnote) == REG_DEAD
-		|| REG_NOTE_KIND (*pnote) == REG_UNUSED)
+	    if (REG_NOTE_KIND (*pnote) == REG_DEAD)
 	      *pnote = XEXP (*pnote, 1);
 	    else
 	      pnote = &XEXP (*pnote, 1);

-- 
Andreas Schwab                                      "And now for something
schwab@issan.cs.uni-dortmund.de                      completely different"
schwab@gnu.org



More information about the Gcc-bugs mailing list