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 debug/84545


This fixes the slew of -fcompare-debug regressions present in the testsuite 
for targets with delay slots and caused by REG_CALL_ARG_LOCATION notes still 
present in the .final dumps.

Tested on SPARC64/Linux and x86-64/Linux, applied on the mainline as obvious.


2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>

	PR debug/84545
	* final.c (rest_of_clean_state): Also look for calls inside sequences.

-- 
Eric Botcazou
Index: final.c
===================================================================
--- final.c	(revision 257983)
+++ final.c	(working copy)
@@ -4845,11 +4845,19 @@ rest_of_clean_state (void)
       SET_NEXT_INSN (insn) = NULL;
       SET_PREV_INSN (insn) = NULL;
 
-      if (CALL_P (insn))
+      rtx_insn *call_insn = insn;
+      if (NONJUMP_INSN_P (call_insn)
+	  && GET_CODE (PATTERN (call_insn)) == SEQUENCE)
 	{
-	  rtx note = find_reg_note (insn, REG_CALL_ARG_LOCATION, NULL_RTX);
+	  rtx_sequence *seq = as_a <rtx_sequence *> (PATTERN (call_insn));
+	  call_insn = seq->insn (0);
+	}
+      if (CALL_P (call_insn))
+	{
+	  rtx note
+	    = find_reg_note (call_insn, REG_CALL_ARG_LOCATION, NULL_RTX);
 	  if (note)
-	    remove_note (insn, note);
+	    remove_note (call_insn, note);
 	}
 
       if (final_output

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