* lto-streamer-out.c (wrap_refs): Only wrap public decls.
authorJan Hubicka <hubicka@ucw.cz>
Thu, 10 Dec 2015 19:21:31 +0000 (20:21 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 10 Dec 2015 19:21:31 +0000 (19:21 +0000)
From-SVN: r231541

gcc/ChangeLog
gcc/lto-streamer-out.c

index fb1cb06a7f428d458754493b3b2e0cc230cc6d9d..056b7abcb005e063e6ac11f33146202da827f03d 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-10  Jan Hubicka  <hubicka@ucw.cz>
+
+       * lto-streamer-out.c (wrap_refs): Only wrap public decls.
+
 2015-12-10  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-cp.c (ipcp_cloning_candidate_p): Use node->optimize_for_size_p.
index a8748464c210c17aa40030342e51dd3dfa7971ca..5524f84dc066947644afb757e64b84191e1ddcbb 100644 (file)
@@ -2236,7 +2236,8 @@ wrap_refs (tree *tp, int *ws, void *)
 {
   tree t = *tp;
   if (handled_component_p (t)
-      && TREE_CODE (TREE_OPERAND (t, 0)) == VAR_DECL)
+      && TREE_CODE (TREE_OPERAND (t, 0)) == VAR_DECL
+      && TREE_PUBLIC (TREE_OPERAND (t, 0)))
     {
       tree decl = TREE_OPERAND (t, 0);
       tree ptrtype = build_pointer_type (TREE_TYPE (decl));