[Bug debug/51650] [4.7 regression] LTO ICE in dwarf2out_finish, at dwarf2out.c:22501 while building libxul

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 23 11:46:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51650

--- Comment #17 from Richard Guenther <rguenth at gcc dot gnu.org> 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.



More information about the Gcc-bugs mailing list