From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19153 invoked by alias); 18 Dec 2013 22:01:45 -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 Received: (qmail 19105 invoked by uid 48); 18 Dec 2013 22:01:42 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59440] [4.9 Regression] ICE in force_decl_die, at dwarf2out.c:20111 with -g Date: Wed, 18 Dec 2013 22:01:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: burnus at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-12/txt/msg01695.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59440 --- Comment #8 from Tobias Burnus --- The problem is the following code in tree-nested.c: /* A subroutine of convert_local_reference. Create a local variable in the parent function with DECL_VALUE_EXPR set to reference the field in FRAME. This is used both for debug info and in OpenMP lowering. */ static tree get_local_debug_decl (struct nesting_info *info, tree decl, tree field) { ... new_decl = build_decl (DECL_SOURCE_LOCATION (decl), VAR_DECL, DECL_NAME (decl), TREE_TYPE (decl)); DECL_IGNORED_P (new_decl) = DECL_IGNORED_P (decl); ... /* Do not emit debug info twice. */ DECL_IGNORED_P (decl) = 1; } Result: new_decl gets emitted due to DECL_IGNORED_P being copied - but the NAMELIST_DECL still points to the 'old' decl, which now has DECL_IGNORED_P() = 1.