public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Geoff Keating <geoffk@geoffk.org>
To: kgardas@objectsecurity.com
Cc: gcc@gcc.gnu.org
Subject: Re: [pch-branch] missing binary operator issue.
Date: Tue, 07 Jan 2003 19:32:00 -0000	[thread overview]
Message-ID: <200301071920.h07JK1I04152@desire.geoffk.org> (raw)
In-Reply-To: <Pine.LNX.4.43.0301022219220.7028-100000@thinkpad.c0202001.roe.itnq.net> (message from Karel Gardas on Thu, 2 Jan 2003 22:25:31 +0100 (CET))


> /tmp/cczg5mr7.s:2963: Error: symbol `.LCFI0' is already defined
...
> /tmp/cczg5mr7.s:2973: Error: symbol `.L2' is already defined

This patch might fix this problem.  Could you test it?

I know there are other problems with DWARF2 output, so I don't promise
the resulting DWARF2 is correct, but it should at least assemble.

It'd be good if you could provide a small test case that triggers the
problem, I didn't manage to generate one.

-- 
- Geoffrey Keating <geoffk@geoffk.org>

===File ~/patches/apple/pchbranch-moredwarfcounters.patch===
2003-01-06  Geoffrey Keating  <geoffk@apple.com>

	* dwarf2out.c (dwarf2out_cfi_label): Move label_num out of
	the routine and mark it for PCH.
	(gen_internal_sym): Likewise.
	
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.349.2.17
diff -u -p -u -p -r1.349.2.17 dwarf2out.c
--- dwarf2out.c	24 Dec 2002 02:06:23 -0000	1.349.2.17
+++ dwarf2out.c	7 Jan 2003 01:30:38 -0000
@@ -1,5 +1,5 @@
 /* Output Dwarf2 format symbol table information from the GNU C compiler.
-   Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+   Copyright (C) 1992, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    Free Software Foundation, Inc.
    Contributed by Gary Funck (gary@intrepid.com).
    Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com).
@@ -305,7 +305,11 @@ struct indirect_string_node GTY(())
 
 static GTY ((param_is (struct indirect_string_node))) htab_t debug_str_hash;
 
+/* Various counters for generating labels.  */
+
 static GTY(()) int dw2_string_counter;
+static GTY(()) unsigned long dwarf2out_cfi_label_counter;
+static GTY(()) int gen_internal_sym_counter;
 
 #if defined (DWARF2_DEBUGGING_INFO) || defined (DWARF2_UNWIND_INFO)
 
@@ -561,9 +565,8 @@ char *
 dwarf2out_cfi_label ()
 {
   static char label[20];
-  static unsigned long label_num = 0;
 
-  ASM_GENERATE_INTERNAL_LABEL (label, "LCFI", label_num++);
+  ASM_GENERATE_INTERNAL_LABEL (label, "LCFI", dwarf2out_cfi_label_counter++);
   ASM_OUTPUT_LABEL (asm_out_file, label);
   return label;
 }
@@ -5939,9 +5942,8 @@ gen_internal_sym (prefix)
      const char *prefix;
 {
   char buf[256];
-  static int label_num;
 
-  ASM_GENERATE_INTERNAL_LABEL (buf, prefix, label_num++);
+  ASM_GENERATE_INTERNAL_LABEL (buf, prefix, gen_internal_sym_counter++);
   return xstrdup (buf);
 }
 
============================================================

  parent reply	other threads:[~2003-01-07 19:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-13  4:04 Karel Gardas
2003-01-02 17:59 ` Geoff Keating
2003-01-02 21:26   ` Karel Gardas
2003-01-02 22:21     ` Andrew Pinski
2003-01-07 19:32     ` Geoff Keating [this message]
2003-01-08 16:06       ` Karel Gardas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200301071920.h07JK1I04152@desire.geoffk.org \
    --to=geoffk@geoffk.org \
    --cc=gcc@gcc.gnu.org \
    --cc=kgardas@objectsecurity.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).