re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2)
authorJan Hubicka <hubicka@ucw.cz>
Tue, 8 Dec 2015 22:03:36 +0000 (23:03 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 8 Dec 2015 22:03:36 +0000 (22:03 +0000)
PR ipa/61886
* lto-cgraph.c (compute_ltrans_boundary): Add transparent alias targets
into the boundary.

From-SVN: r231430

gcc/ChangeLog
gcc/lto-cgraph.c

index 55f89c9fd588ff0e3e66d7a6d5c5bac332ad8eeb..4ee6a3258706bb4886640b2435ca30b2fa1e424b 100644 (file)
@@ -1,3 +1,9 @@
+2015-12-08  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR ipa/61886
+       * lto-cgraph.c (compute_ltrans_boundary): Add transparent alias targets
+       into the boundary.
+
 2015-12-08  Jan Hubicka  <hubicka@ucw.cz>
 
        PR ipa/61886
index e1c259593d95cc44fe1aea97a090bbd4e50fdf06..62e54547d57495c38327b8e69a43ec94c8449c6f 100644 (file)
@@ -972,6 +972,15 @@ compute_ltrans_boundary (lto_symtab_encoder_t in_encoder)
       if (cnode
          && cnode->thunk.thunk_p)
        add_node_to (encoder, cnode->callees->callee, false);
+      while (node->transparent_alias && node->analyzed)
+       {
+         node = node->get_alias_target ();
+         if (is_a <cgraph_node *> (node))
+           add_node_to (encoder, dyn_cast <cgraph_node *> (node),
+                        false);
+         else
+           lto_symtab_encoder_encode (encoder, node);
+       }
     }
   lto_symtab_encoder_delete (in_encoder);
   return encoder;