From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5744 invoked by alias); 25 Jan 2012 17:42:14 -0000 Received: (qmail 5731 invoked by uid 22791); 25 Jan 2012 17:42:13 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Jan 2012 17:42:00 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/51950] [4.6/4.7 Regression] fdebug-types-section regression for member pointers Date: Wed, 25 Jan 2012 18:40:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.3 X-Bugzilla-Changed-Fields: Status Last reconfirmed AssignedTo Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-01/txt/msg02964.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51950 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2012-01-25 AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #2 from Jakub Jelinek 2012-01-25 17:41:58 UTC --- Created attachment 26465 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26465 gcc47-pr51950.patch Untested fix. This "regressed" with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162691 which just made a cloning bug no longer latent, because DW_AT_object_pointer the patch added is a reference to one of its children. The problem is that we were using clone_tree to clone all the children (in this case of DW_TAG_subroutine_type), but clone_tree didn't enter all the children (DW_TAG_formal_parameter in particular) into the hash table. So we ended up with a clone DW_TAG_subroutine_type with a single cloned DW_TAG_formal_parameter. Next clone_decls_walk attempted to adjust the references in the attributes (DW_AT_object_pointer), but nothing was in the hash table, so it created another DW_TAG_formal_parameter clone, and when adding also its ancestor tree the DW_TAG_subroutine_type has been found in the hash table and so this second DW_TAG_formal_parameter has been added as another child.