From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3536 invoked by alias); 19 Nov 2010 07:36:13 -0000 Received: (qmail 3454 invoked by uid 22791); 19 Nov 2010 07:36:11 -0000 X-SWARE-Spam-Status: No, hits=-2.8 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; Fri, 19 Nov 2010 07:36:07 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/46123] [4.5/4.6 Regression] ICE: in output_aranges, at dwarf2out.c:11531 with -feliminate-dwarf2-dups -g X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.5.2 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 Date: Fri, 19 Nov 2010 07:42:00 -0000 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-11/txt/msg02422.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46123 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek 2010-11-19 07:36:03 UTC --- context_die == NULL happens exactly on the g++.old-deja/g++.other/mangle3.C testcase, i.e. on an inline method of a type contained in another inline method of another type. The reason why context_die is NULL is because on this inner method decl_function_scope returns non-NULL - while the inner method is contained in a type, not in a function, that type is contained in a function. The reusing happens only if is_cu_die (old_die->parent) or context_die == NULL and for is_cu_die (old_die->parent) it should never be a problem. I guess a different fix would be not to use decl_function_scope in deciding whether to clear context_die, but use another function, which would return NULL as soon as we switch from a FUNCTION_DECL to a type while traversing the contexts.