From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16120 invoked by alias); 23 Dec 2011 11:24:47 -0000 Received: (qmail 16110 invoked by uid 22791); 23 Dec 2011 11:24:46 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_BX,TW_IB 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, 23 Dec 2011 11:24:32 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/51650] [4.7 regression] LTO ICE in dwarf2out_finish, at dwarf2out.c:22501 while building libxul Date: Fri, 23 Dec 2011 11:46: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: ice-on-valid-code, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.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: 2011-12/txt/msg02536.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51650 --- Comment #17 from Richard Guenther 2011-12-23 11:23:56 UTC --- (In reply to comment #16) > We can fix the resolution with > > Index: gcc/lto-symtab.c > =================================================================== > --- gcc/lto-symtab.c (revision 182652) > +++ gcc/lto-symtab.c (working copy) > @@ -715,6 +715,14 @@ lto_symtab_merge_cgraph_nodes_1 (void ** > { > lto_symtab_entry_t e, prevailing = (lto_symtab_entry_t) *slot; > > + if (prevailing->guessed) > + { > + if (prevailing->node) > + prevailing->node->resolution = prevailing->resolution; > + if (prevailing->vnode) > + prevailing->vnode->resolution = prevailing->resolution; > + } > + > if (!prevailing->next) > return 1; > > but still the local static is marked needed because of > > if (node->finalized) > varpool_mark_needed_node (node); > > in input_varpool_node. Not sure why we stream that flag at all? Surely > whether to output sth is to be still decided? > > I would say sth like > > Index: gcc/lto-cgraph.c > =================================================================== > --- gcc/lto-cgraph.c (revision 182652) > +++ gcc/lto-cgraph.c (working copy) > @@ -1080,6 +1080,8 @@ input_varpool_node (struct lto_file_decl > DECL_EXTERNAL (node->decl) = 1; > TREE_STATIC (node->decl) = 0; > } > + if (!flag_ltrans) > + node->finalized = 0; > if (node->finalized) > varpool_mark_needed_node (node); > if (non_null_aliasof) > > is in order, or a similar > > Index: gcc/lto-cgraph.c > =================================================================== > --- gcc/lto-cgraph.c (revision 182652) > +++ gcc/lto-cgraph.c (working copy) > @@ -565,7 +565,7 @@ lto_output_varpool_node (struct lto_simp > bp = bitpack_create (ob->main_stream); > bp_pack_value (&bp, node->externally_visible, 1); > bp_pack_value (&bp, node->force_output, 1); > - bp_pack_value (&bp, node->finalized, 1); > + bp_pack_value (&bp, in_lto_p && node->finalized, 1); > bp_pack_value (&bp, node->alias, 1); > bp_pack_value (&bp, node->alias_of != NULL, 1); > gcc_assert (node->finalized || !node->analyzed); > > Honza? See PR51663 for this issue.