re PR debug/84545 (FAIL: g++.dg/debug/pr44182.C -gdwarf-2 -O2 (test for excess errors))
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 26 Feb 2018 15:40:18 +0000 (15:40 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 26 Feb 2018 15:40:18 +0000 (15:40 +0000)
PR debug/84545
* final.c (rest_of_clean_state): Also look for calls inside sequences.

From-SVN: r257993

gcc/ChangeLog
gcc/final.c

index d2ca7b0c5e4c4e5ff4d838054898647acb582486..3e1eae15bb55e7f99fdbc6b9abbe224d3d8aadb4 100644 (file)
@@ -1,3 +1,8 @@
+2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR debug/84545
+       * final.c (rest_of_clean_state): Also look for calls inside sequences.
+
 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/84530
index d2c3cd8a06ec19d8bdf4d8dd591b87b082c572e3..b3450a1489756882fbd93fb2b8ad5c50f052466a 100644 (file)
@@ -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