From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8339 invoked by alias); 5 Jun 2012 18:07:54 -0000 Received: (qmail 8324 invoked by uid 22791); 5 Jun 2012 18:07:52 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED 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; Tue, 05 Jun 2012 18:07:41 +0000 From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/53470] [4.8 Regression] ICE when linking with -g in splice_child_die, at dwarf2out.c:4264 Date: Tue, 05 Jun 2012 18:07: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: lto X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: CC 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-06/txt/msg00261.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53470 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #7 from Jason Merrill 2012-06-05 18:07:14 UTC --- OK, here's the problem: free_lang_data_in_type clears TYPE_CONTEXT of Holder. gen_tagged_type_die tries to emit an enclosing class first, but since TYPE_CONTEXT is null, it thinks Holder isn't a nested class. gen_struct_or_union_type_die calls scope_die_for, which forces out ExtensionCord, which also generates a DIE for Holder. gen_struct_or_union_type_die contiues to generate what is now a duplicate DIE for Holder. What is the rationale for clearing TYPE_CONTEXT of Holder? It seems quite deliberate, but there's no comment explaining why it would be a good idea.