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 rtl-optimization/54088


This is a regression present on mainline and 4.7 branch and a variant of:
  http://gcc.gnu.org/ml/gcc-patches/2012-05/msg01076.html
The difference is that there is a barrier between the CALL_INSN and the 
CALL_ARG_LOCATION note (delete_related_insns is called from reorg.c and the dbr 
pass is run after the barriers pass, which puts the barrier there on purpose).

Tested on x86_64-suse-linux, applied on the mainline and 4.7 branch.


2012-08-25  Eric Botcazou  <ebotcazou@adacore.com>

	PR rtl-optimization/54088
	* jump.c (delete_related_insns): Robustify latest change.


-- 
Eric Botcazou
Index: jump.c
===================================================================
--- jump.c	(revision 190665)
+++ jump.c	(working copy)
@@ -1260,9 +1260,9 @@ delete_related_insns (rtx insn)
 	  && GET_CODE (PATTERN (insn)) == SEQUENCE
 	  && CALL_P (XVECEXP (PATTERN (insn), 0, 0))))
     {
-      rtx p = insn;
+      rtx p;
 
-      for (p = NEXT_INSN (p);
+      for (p = next && INSN_DELETED_P (next) ? NEXT_INSN (next) : next;
 	   p && NOTE_P (p);
 	   p = NEXT_INSN (p))
 	if (NOTE_KIND (p) == NOTE_INSN_CALL_ARG_LOCATION)

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