From 24086c202126d899fc24caa495d4feb3a0687897 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 26 Feb 2018 15:40:18 +0000 Subject: [PATCH] re PR debug/84545 (FAIL: g++.dg/debug/pr44182.C -gdwarf-2 -O2 (test for excess errors)) PR debug/84545 * final.c (rest_of_clean_state): Also look for calls inside sequences. From-SVN: r257993 --- gcc/ChangeLog | 5 +++++ gcc/final.c | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d2ca7b0c5e4..3e1eae15bb5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-02-26 Eric Botcazou + + PR debug/84545 + * final.c (rest_of_clean_state): Also look for calls inside sequences. + 2018-02-26 H.J. Lu PR target/84530 diff --git a/gcc/final.c b/gcc/final.c index d2c3cd8a06e..b3450a14897 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -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 (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 -- 2.30.2