]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR debug/52165 (ICE in add_var_loc_to_decl, at dwarf2out.c:5430 building libgo...
authorJakub Jelinek <jakub@redhat.com>
Thu, 9 Feb 2012 11:41:25 +0000 (12:41 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 9 Feb 2012 11:41:25 +0000 (12:41 +0100)
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.

From-SVN: r184042

gcc/ChangeLog
gcc/var-tracking.c

index 05837c6dd295660baef315bf73f666f3cda3de2e..07ae1a8a31b177d0b428241eac7491748c1e9cf5 100644 (file)
@@ -1,3 +1,11 @@
+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
index 1f4903a83fec4e75531daae373cb2d848e69c8a1..e9b5ca886ae36547ea45626e555145c206caa69a 100644 (file)
@@ -8225,9 +8225,14 @@ emit_note_insn_var_location (void **varp, void *data)
       /* 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);