From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12321 invoked by alias); 7 Jan 2003 19:20:19 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 12313 invoked from network); 7 Jan 2003 19:20:19 -0000 Received: from unknown (HELO desire.geoffk.org) (12.235.56.190) by 209.249.29.67 with SMTP; 7 Jan 2003 19:20:19 -0000 Received: (from geoffk@localhost) by desire.geoffk.org (8.11.6/8.11.6) id h07JK1I04152; Tue, 7 Jan 2003 11:20:01 -0800 Date: Tue, 07 Jan 2003 19:32:00 -0000 From: Geoff Keating Message-Id: <200301071920.h07JK1I04152@desire.geoffk.org> To: kgardas@objectsecurity.com CC: gcc@gcc.gnu.org In-reply-to: (message from Karel Gardas on Thu, 2 Jan 2003 22:25:31 +0100 (CET)) Subject: Re: [pch-branch] missing binary operator issue. References: X-SW-Source: 2003-01/txt/msg00365.txt.bz2 > /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 ===File ~/patches/apple/pchbranch-moredwarfcounters.patch=== 2003-01-06 Geoffrey Keating * 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); } ============================================================