From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28110 invoked by alias); 6 Jun 2012 15:27:43 -0000 Received: (qmail 28099 invoked by uid 22791); 6 Jun 2012 15:27:41 -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; Wed, 06 Jun 2012 15:27:28 +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: Wed, 06 Jun 2012 15:27: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: 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/msg00333.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53470 --- Comment #9 from Jason Merrill 2012-06-06 15:27:02 UTC --- (In reply to comment #8) > All of the clearing is done to push down memory usage and/or cause > types to be referenced that are otherwise unused. A way to retain the > latter would be to not recurse into TYPE_CONTEXT during find_decls_types_r > and in free_lang_data_in_type only reset TYPE_CONTEXT when > that is not in fld.pset (thus we didn't visit it, aka, it is unused). If a type is nested inside another type, using the inner type necessarily uses the outer type; we need to at least declare the outer type so we have some place to put the inner type. So I don't think there's any optimization opportunity here. > Note that the fundamental issue with running free-lang-data with -g0 > and lto1 with -g is that free-lang-data with -g0 assumes we won't > generate debug information. Yes, but that isn't the problem with this PR; in this case cc1plus and lto1 are both run with -g. free_lang_data_in_type is clearing TYPE_CONTEXT even though we want full debug information, and this lying to the debugging back end results in the ICE.