OSDN Git Service

PR debug/41695
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Oct 2009 09:53:55 +0000 (09:53 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Oct 2009 09:53:55 +0000 (09:53 +0000)
* dwarf2out.c (dwarf2out_var_location): Always clear
last_postcall_label when changing last_label.

* gcc.dg/debug/dwarf2/pr41695.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152760 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c [new file with mode: 0644]

index bbb97ec..992f9b6 100644 (file)
@@ -1,3 +1,9 @@
+2009-10-14  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/41695
+       * dwarf2out.c (dwarf2out_var_location): Always clear
+       last_postcall_label when changing last_label.
+
 2009-10-14  Pascal Obry  <obry@adacore.com>
 
        * gcc.c (DEFAULT_SWITCH_CURTAILS_COMPILATION): Add -E.
index 1e47e7a..2f9d2b8 100644 (file)
@@ -20013,8 +20013,7 @@ dwarf2out_var_location (rtx loc_note)
       ASM_OUTPUT_DEBUG_LABEL (asm_out_file, "LVL", loclabel_num);
       loclabel_num++;
       last_label = ggc_strdup (loclabel);
-      if (!NOTE_DURING_CALL_P (loc_note))
-       last_postcall_label = NULL;
+      last_postcall_label = NULL;
     }
   newloc->var_loc_note = loc_note;
   newloc->next = NULL;
index 3faf8f2..c93c579 100644 (file)
@@ -1,8 +1,13 @@
+2009-10-14  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/41695
+       * gcc.dg/debug/dwarf2/pr41695.c: New test.
+
 2009-10-14  Uros Bizjak  <ubizjak@gmail.com>
 
        * gcc.target/i386/i386.exp (check_effective_target_ms_hook_prologue):
        New procedure.
-       * gcc.target/i386/ms_hook_prologue.c: Check for  ms_hook_prologue
+       * gcc.target/i386/ms_hook_prologue.c: Check for ms_hook_prologue
        effective target.
 
 2009-10-14  Jason Merrill  <jason@redhat.com>
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c
new file mode 100644 (file)
index 0000000..d61b5a2
--- /dev/null
@@ -0,0 +1,18 @@
+/* PR debug/41695 */
+/* { dg-do compile } */
+/* { dg-options "-g -O2 -dA -fno-merge-debug-strings" } */
+
+int bar (int);
+
+void
+foo (void)
+{
+  int b = 0;
+  b = bar (b);
+  b = bar (b);
+  b = bar (b);
+  b = bar (b);
+  bar (b);
+}
+
+/* { dg-final { scan-assembler-not "LVL(\[0-9\]+)-\[^1\]\[^\\r\\n\]*Location list begin address\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*LVL\\1-1-" } } */