* var-tracking.c (emit_note_insn_var_location): If
EMIT_NOTE_BEFORE_INSN and insn is NOTE_INSN_CALL_ARG_LOCATION,
emit it before next non-NOTE_INSN_CALL_ARG_LOCATION
non-NOTE_DURING_CALL_P insn.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184042
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-02-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/52165
+ * var-tracking.c (emit_note_insn_var_location): If
+ EMIT_NOTE_BEFORE_INSN and insn is NOTE_INSN_CALL_ARG_LOCATION,
+ emit it before next non-NOTE_INSN_CALL_ARG_LOCATION
+ non-NOTE_DURING_CALL_P insn.
+
2012-02-09 Bin Cheng <bin.cheng@arm.com>
PR middle-end/51867
/* Make sure that the call related notes come first. */
while (NEXT_INSN (insn)
&& NOTE_P (insn)
- && NOTE_DURING_CALL_P (insn))
+ && ((NOTE_KIND (insn) == NOTE_INSN_VAR_LOCATION
+ && NOTE_DURING_CALL_P (insn))
+ || NOTE_KIND (insn) == NOTE_INSN_CALL_ARG_LOCATION))
insn = NEXT_INSN (insn);
- if (NOTE_P (insn) && NOTE_DURING_CALL_P (insn))
+ if (NOTE_P (insn)
+ && ((NOTE_KIND (insn) == NOTE_INSN_VAR_LOCATION
+ && NOTE_DURING_CALL_P (insn))
+ || NOTE_KIND (insn) == NOTE_INSN_CALL_ARG_LOCATION))
note = emit_note_after (NOTE_INSN_VAR_LOCATION, insn);
else
note = emit_note_before (NOTE_INSN_VAR_LOCATION, insn);