From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26171 invoked by alias); 27 Jul 2010 10:40:06 -0000 Received: (qmail 25992 invoked by uid 48); 27 Jul 2010 10:39:38 -0000 Date: Tue, 27 Jul 2010 10:40:00 -0000 Message-ID: <20100727103938.25991.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug debug/45048] duplicate DW_TAG_variable In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg02952.txt.bz2 ------- Comment #2 from jakub at gcc dot gnu dot org 2010-07-27 10:39 ------- One of these DW_TAG_variable DIEs at the DW_TAG_namespace scope is created from declare_in_namespace when processing decls_for_scope of a lexical block. The other one comes from declare_in_namespace from dwarf2out_global_decl from wrapup_globals_for_namespace. The problem is that the C++ FE doesn't unify externs, so the debugger sees different decls with the same name, but different DECL_UID. So for say namespace N { int i; void foo (void) { { extern int i; i++; } { extern int i; i++; } { extern int i; i++; } { extern int i; i++; } } } there will be 5 DW_TAG_variable DIEs in DW_TAG_namespace. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dodji at gcc dot gnu dot | |org, jason at gcc dot gnu | |dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45048