Prevent extraneous errors from returnjump_p with rtl checking

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


Hi Guys,

  The patch below prevents errors from being reported when RTL
  checking is enabled and returnjump_p() encounters insns which are
  not code insns.

  Is it OK to apply this patch ?

Cheers
	Nick


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

	* jump.c (returnjump_p): Do not examine insn which do not have
	a pattern (if RTL checking is enabled).

Index: jump.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/jump.c,v
retrieving revision 1.101
diff -p -r1.101 jump.c
*** jump.c	2000/01/24 20:10:01	1.101
--- jump.c	2000/01/26 00:02:58
*************** int
*** 3754,3759 ****
--- 3754,3765 ----
  returnjump_p (insn)
       rtx insn;
  {
+ #if ENABLE_RTL_CHECKING
+   if (GET_CODE (insn) != INSN
+       && GET_CODE (insn) != JUMP_INSN
+       && GET_CODE (insn) != CALL_INSN)
+     return 0;
+ #endif
    return for_each_rtx (&PATTERN (insn), returnjump_p_1, NULL);
  }
  


More information about the Gcc-patches mailing list