summaryrefslogtreecommitdiff
path: root/gcc/lto/lto.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lto/lto.c')
-rw-r--r--gcc/lto/lto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index d306580a971..d653b04e55f 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -584,7 +584,7 @@ lto_1_to_1_map (void)
for (vnode = varpool_nodes; vnode; vnode = vnode->next)
{
- if (vnode->alias)
+ if (vnode->alias || !vnode->needed)
continue;
slot = pointer_map_contains (vpmap, file_data);
if (slot)