[REPOST] Fix expand_libcall_block ICEs

David S. Miller davem@redhat.com
Wed Apr 26 08:25:00 GMT 2000


I've gotten no feedback on this patch, so I still have not
installed the change yet.

The gist of the matter is that the reg_mentioned_p call takes
the PATTERN of an rtx which is potentially not of rtx class 'i',
and in the particular case I caught, it was of type NOTE.  This
bug prevents full bootstraps on Sparc right now.

Can someone let me know if this is OK or not so I can install
this fix?

Thanks.

Sat Apr 22 21:46:23 PDT 2000  David S. Miller  <davem@redhat.com>

	* optabs.c (expand_libcall_block): Check that insns is of
	rtx class 'i' before taking a PATTERN of it.

--- optabs.c.~1~	Fri Apr 21 10:15:03 2000
+++ optabs.c	Wed Apr 26 02:31:39 2000
@@ -2789,7 +2789,8 @@ emit_libcall_block (insns, target, resul
       if (set != 0 && GET_CODE (SET_DEST (set)) == REG
 	  && REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER
 	  && (insn == insns
-	      || (! reg_mentioned_p (SET_DEST (set), PATTERN (insns))
+	      || ((GET_RTX_CLASS (GET_CODE (insns)) != 'i'
+		   || ! reg_mentioned_p (SET_DEST (set), PATTERN (insns)))
 		  && ! reg_used_between_p (SET_DEST (set), insns, insn)
 		  && ! modified_in_p (SET_SRC (set), insns)
 		  && ! modified_between_p (SET_SRC (set), insns, insn))))


More information about the Gcc-patches mailing list