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]

Fix PR middle end/18718, REG_SAVE_NOTE related segfault


REG_SAVE_NOTEs are not in pairs, with the region part no longer emitted.

	PR middle end/18718
	* sched-rgn.c (schedule_region): Don't assume REG_SAVE_NOTEs are
	in pairs.

Bootstrap and regression test powerpc-linux in progress.  OK mainline?

Index: gcc/sched-rgn.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sched-rgn.c,v
retrieving revision 1.87
diff -u -p -r1.87 sched-rgn.c
--- gcc/sched-rgn.c	22 Nov 2004 12:23:57 -0000	1.87
+++ gcc/sched-rgn.c	30 Nov 2004 04:31:51 -0000
@@ -2324,11 +2324,7 @@ schedule_region (int rgn)
 
 	  for (note = REG_NOTES (head); note; note = XEXP (note, 1))
 	    if (REG_NOTE_KIND (note) == REG_SAVE_NOTE)
-	      {
-		remove_note (head, note);
-		note = XEXP (note, 1);
-		remove_note (head, note);
-	      }
+	      remove_note (head, note);
 	}
 
       /* Remove remaining note insns from the block, save them in

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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