Message ID | 20110401211840.GD18914@tyan-ft48-01.lab.bos.redhat.com |
---|---|
State | New |
Headers | show |
On Fri, Apr 1, 2011 at 2:18 PM, Jakub Jelinek <jakub@redhat.com> wrote: > Hi! > > richi's lto-cgraph.c change actually didn't do anything, because > DECL_ABSTRACT_ORIGIN is still NULL there, see PR for details. > This patch instead doesn't try to force dies for DECL_ABSTRACT_ORIGIN > DECL_EXTERNAL decls, as dwarf2out isn't prepared to handle them. > > Bootstrapped/regtested on x86_64-linux and i686-linux, > attempted also LTO bootstrap, but it failed in other unrelated > places (x86_64 somewhere in Ada and i686 because it was trying > to emit .Ldebug_info0 twice). I'll try to look at those later, > but this is a step forward, approved on IRC by rth. > Emitting .Ldebug_info0 twice is caused by revision 171033: http://gcc.gnu.org/ml/gcc-cvs/2011-03/msg00455.html
--- gcc/dwarf2out.c.jj 2011-04-01 11:04:36.000000000 +0200 +++ gcc/dwarf2out.c 2011-04-01 18:08:30.864796302 +0200 @@ -23023,7 +23023,9 @@ resolve_addr (dw_die_ref die) { tree tdecl = SYMBOL_REF_DECL (a->dw_attr_val.v.val_addr); dw_die_ref tdie = lookup_decl_die (tdecl); - if (tdie == NULL && DECL_EXTERNAL (tdecl)) + if (tdie == NULL + && DECL_EXTERNAL (tdecl) + && DECL_ABSTRACT_ORIGIN (tdecl) == NULL_TREE) { force_decl_die (tdecl); tdie = lookup_decl_die (tdecl); --- gcc/lto-cgraph.c.jj 2011-03-17 16:20:09.000000000 +0100 +++ gcc/lto-cgraph.c 2011-04-01 18:02:37.570845862 +0200 @@ -975,7 +975,6 @@ input_overwrite_node (struct lto_file_de || node->clone_of->decl != node->decl)) { DECL_EXTERNAL (node->decl) = 1; - DECL_ABSTRACT_ORIGIN (node->decl) = NULL_TREE; TREE_STATIC (node->decl) = 0; } node->alias = bp_unpack_value (bp, 1); @@ -1147,7 +1146,6 @@ input_varpool_node (struct lto_file_decl if (node->in_other_partition) { DECL_EXTERNAL (node->decl) = 1; - DECL_ABSTRACT_ORIGIN (node->decl) = NULL_TREE; TREE_STATIC (node->decl) = 0; } aliases_p = bp_unpack_value (&bp, 1);