Prevent extraneous errors from returnjump_p with rtl checking

Nick Clifton nickc@cygnus.com
Tue Jan 25 16:55:00 GMT 2000


Hi Richard,
  
: No.  It's either always wrong or it isn't.
: 
: Where's this getting called on non-jump_insn rtxs?


Oh poo!  You are right.  It was coming from my code to check to see a
return insn was being emitted with emit_insn rather than emit_jump_insn.
*sigh*  Please ignore my previous patch and tell me if the following
is better.

Cheers
	Nick


2000-01-25  Nick Clifton  <nickc@redhat.com>

	* emit-rtl.c (emit_insn): Only check machine class insns for
	improper emission of a RETURN.

Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/emit-rtl.c,v
retrieving revision 1.105
diff -p -r1.105 emit-rtl.c
*** emit-rtl.c	2000/01/24 04:02:40	1.105
--- emit-rtl.c	2000/01/26 00:54:26
*************** emit_insn (pattern)
*** 2961,2966 ****
--- 2961,2967 ----
  
  #ifdef ENABLE_RTL_CHECKING
    if (insn
+       && GET_RTX_CLASS (GET_CODE (insn)) == 'i'
        && (returnjump_p (insn)
  	  || (GET_CODE (insn) == SET
  	      && SET_DEST (insn) == pc_rtx)))



More information about the Gcc-patches mailing list