The following patch removes streaming of abstract origins into ltrans
boundaries.  This was introduced by rev. 201468 but I can't find the
post of the change on the mailinglist and thus its reasoning.  Fact is
we never stream DECL_ABSTRACT_ORIGIN, so doing the abstract origin
handling must have had other side-effects.

LTO bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2015-09-24  Richard Biener  <rguent...@suse.de>

        PR lto/67699
        * lto-cgraph.c (compute_ltrans_boundary): Do not stream
        abstract origins.

        * g++.dg/pr67699.C: New testcase.

Index: gcc/lto-cgraph.c
===================================================================
--- gcc/lto-cgraph.c    (revision 228074)
+++ gcc/lto-cgraph.c    (working copy)
@@ -895,14 +895,6 @@ compute_ltrans_boundary (lto_symtab_enco
       add_node_to (encoder, node, true);
       lto_set_symtab_encoder_in_partition (encoder, node);
       create_references (encoder, node);
-      /* For proper debug info, we need to ship the origins, too.  */
-      if (DECL_ABSTRACT_ORIGIN (node->decl))
-       {
-         struct cgraph_node *origin_node
-         = cgraph_node::get_create (DECL_ABSTRACT_ORIGIN (node->decl));
-         origin_node->used_as_abstract_origin = true;
-         add_node_to (encoder, origin_node, true);
-       }
     }
   for (lsei = lsei_start_variable_in_partition (in_encoder);
        !lsei_end_p (lsei); lsei_next_variable_in_partition (&lsei))
@@ -914,13 +906,6 @@ compute_ltrans_boundary (lto_symtab_enco
       lto_set_symtab_encoder_in_partition (encoder, vnode);
       lto_set_symtab_encoder_encode_initializer (encoder, vnode);
       create_references (encoder, vnode);
-      /* For proper debug info, we need to ship the origins, too.  */
-      if (DECL_ABSTRACT_ORIGIN (vnode->decl))
-       {
-         varpool_node *origin_node
-           = varpool_node::get (DECL_ABSTRACT_ORIGIN (vnode->decl));
-         lto_set_symtab_encoder_in_partition (encoder, origin_node);
-       }
     }
   /* Pickle in also the initializer of all referenced readonly variables
      to help folding.  Constant pool variables are not shared, so we must

Reply via email to