From e21bcce86ad4b426b12fb6646f5ea5065a47a485 Mon Sep 17 00:00:00 2001 From: hubicka Date: Thu, 10 Dec 2015 19:21:31 +0000 Subject: [PATCH] * lto-streamer-out.c (wrap_refs): Only wrap public decls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231541 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/lto-streamer-out.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fb1cb06a7f42..056b7abcb005 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-12-10 Jan Hubicka + + * lto-streamer-out.c (wrap_refs): Only wrap public decls. + 2015-12-10 Jan Hubicka * ipa-cp.c (ipcp_cloning_candidate_p): Use node->optimize_for_size_p. diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index a8748464c210..5524f84dc066 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -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)); -- 2.47.2