summaryrefslogtreecommitdiff
path: root/debian/patches/pr65618.diff
blob: 2ec703cd778bb5507ac71747ae9f3f56edeb693a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# DP: Proposed patch for PR rtl-optimization/65618

--- a/src/gcc/emit-rtl.c	
+++ a/src/gcc/emit-rtl.c	
@@ -3742,6 +3742,11 @@ try_split (rtx pat, rtx_insn *trial, int last)
 		   next = NEXT_INSN (next))
 		if (NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
 		  {
+		    /* Advance after to the next instruction if it is about to
+		       be removed */
+		    if (after == next)
+		      after = NEXT_INSN(after);
+
 		    remove_insn (next);
 		    add_insn_after (next, insn, NULL);
 		    break;