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]
Other format: [Raw text]

PATCH: Probably obvious but...


This is probably obvious but since I haven't finished checking it I
thought I'd just send it in :)

We can't dereference a 0.

2002-01-02  Eric Christopher  <echristo@redhat.com>

	* final.c (final_scan_insn): Change 0 -> NULL_RTX in 	FIND_REG_INC_NOTE
call.
	* loop.c (canonicalize_condition): Ditto.
	* reorg.c (delete_scheduled_jump): Ditto.

-- 
I will not use abbrev.

Index: final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.236
diff -u -p -w -r1.236 final.c
--- final.c	2001/12/31 21:33:36	1.236
+++ final.c	2002/01/03 06:29:29
@@ -2372,7 +2372,7 @@ final_scan_insn (insn, file, optimize, p
 			&& rtx_equal_p (SET_SRC (set), cc_status.value2)))
 		  {
 		    /* Don't delete insn if it has an addressing side-effect.  */
-		    if (! FIND_REG_INC_NOTE (insn, 0)
+		    if (! FIND_REG_INC_NOTE (insn, NULL_RTX)
 			/* or if anything in it is volatile.  */
 			&& ! volatile_refs_p (PATTERN (insn)))
 		      {
Index: loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.376
diff -u -p -w -r1.376 loop.c
--- loop.c	2002/01/03 00:51:34	1.376
+++ loop.c	2002/01/03 06:29:35
@@ -9087,7 +9087,7 @@ canonicalize_condition (insn, cond, reve
 
       if ((prev = prev_nonnote_insn (prev)) == 0
 	  || GET_CODE (prev) != INSN
-	  || FIND_REG_INC_NOTE (prev, 0))
+	  || FIND_REG_INC_NOTE (prev, NULL_RTX))
 	break;
 
       set = set_of (op0, prev);
Index: reorg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reorg.c,v
retrieving revision 1.67
diff -u -p -w -r1.67 reorg.c
--- reorg.c	2001/10/11 03:16:03	1.67
+++ reorg.c	2002/01/03 06:29:37
@@ -648,7 +648,7 @@ delete_scheduled_jump (insn)
 	  if (GET_CODE (trial) == NOTE)
 	    trial = prev_nonnote_insn (trial);
 	  if (sets_cc0_p (PATTERN (trial)) != 1
-	      || FIND_REG_INC_NOTE (trial, 0))
+	      || FIND_REG_INC_NOTE (trial, NULL_RTX))
 	    return;
 	  if (PREV_INSN (NEXT_INSN (trial)) == trial)
 	    delete_related_insns (trial);


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