dbxout.c (dbxout_function_end): Do not increment scope_labelno.
authorCarlos O'Donell <carlos@codesourcery.com>
Tue, 18 Jul 2006 04:16:02 +0000 (04:16 +0000)
committerCarlos O'Donell <carlos@gcc.gnu.org>
Tue, 18 Jul 2006 04:16:02 +0000 (04:16 +0000)
2006-07-17  Carlos O'Donell  <carlos@codesourcery.com>

* dbxout.c (dbxout_function_end): Do not increment scope_labelno.
(dbxout_begin_prologue): Increment scope_labelno.

From-SVN: r115544

gcc/ChangeLog
gcc/dbxout.c

index b51abfe7e1c4fae5f7359bca4863bd959ff7a394..320f1631c115c1a5fef34c792d356dc5fd4e59c0 100644 (file)
@@ -1,3 +1,8 @@
+2006-07-17  Carlos O'Donell  <carlos@codesourcery.com>
+
+       * dbxout.c (dbxout_function_end): Do not increment scope_labelno.
+       (dbxout_begin_prologue): Increment scope_labelno.
+
 2006-07-17  Richard Henderson  <rth@redhat.com>
 
        PR 27889
index 07d0bccfb3ad3fc3dbcc5d9b0d90e58a2197122a..49a32425f900b31b0a2e3baa07975ad1f4cd7c09 100644 (file)
@@ -905,7 +905,6 @@ static void
 dbxout_function_end (tree decl)
 {
   char lscope_label_name[100];
-  int lscope_labelno = scope_labelno++;
 
   /* The Lscope label must be emitted even if we aren't doing anything
      else; dbxout_block needs it.  */
@@ -914,8 +913,8 @@ dbxout_function_end (tree decl)
   /* Convert Lscope into the appropriate format for local labels in case
      the system doesn't insert underscores in front of user generated
      labels.  */
-  ASM_GENERATE_INTERNAL_LABEL (lscope_label_name, "Lscope", lscope_labelno);
-  targetm.asm_out.internal_label (asm_out_file, "Lscope", lscope_labelno);
+  ASM_GENERATE_INTERNAL_LABEL (lscope_label_name, "Lscope", scope_labelno);
+  targetm.asm_out.internal_label (asm_out_file, "Lscope", scope_labelno);
 
   /* The N_FUN tag at the end of the function is a GNU extension,
      which may be undesirable, and is unnecessary if we do not have
@@ -941,7 +940,7 @@ dbxout_function_end (tree decl)
     {
       char begin_label[20];
       /* Reference current function start using LFBB.  */
-      ASM_GENERATE_INTERNAL_LABEL (begin_label, "LFBB", lscope_labelno);
+      ASM_GENERATE_INTERNAL_LABEL (begin_label, "LFBB", scope_labelno);
       dbxout_begin_empty_stabs (N_FUN);
       dbxout_stab_value_label_diff (lscope_label_name, begin_label);
     }
@@ -1249,6 +1248,9 @@ dbxout_begin_prologue (unsigned int lineno, const char *filename)
       && !flag_debug_only_used_symbols)
     dbxout_stabd (N_BNSYM, 0);
 
+  /* pre-increment the scope counter */
+  scope_labelno++;
+
   dbxout_source_line (lineno, filename);
   /* Output function begin block at function scope, referenced 
      by dbxout_block, dbxout_source_line and dbxout_function_end.  */