aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-12-10 20:21:31 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-12-10 19:21:31 +0000
commit35bd8e8fb68675f42f407cf47b2e8df1cd0110e2 (patch)
tree5918b0b0fa4bcc9cdeae59dcb4e00ae7d497b7a3 /gcc/lto-streamer-out.c
parent5af56ae8f839480b279d1c89f4a0a1df7bd8dde2 (diff)
downloadgcc-35bd8e8fb68675f42f407cf47b2e8df1cd0110e2.zip
gcc-35bd8e8fb68675f42f407cf47b2e8df1cd0110e2.tar.gz
gcc-35bd8e8fb68675f42f407cf47b2e8df1cd0110e2.tar.bz2
* lto-streamer-out.c (wrap_refs): Only wrap public decls.
From-SVN: r231541
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index a874846..5524f84 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));