aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-cgraph.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r--gcc/lto-cgraph.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index 2563489..447948f 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -440,7 +440,7 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node,
Cherry-picked nodes: These are nodes we pulled from other
translation units into SET during IPA-inlining. We make them as
local static nodes to prevent clashes with other local statics. */
- if (boundary_p && node->analyzed)
+ if (boundary_p && node->analyzed && !DECL_EXTERNAL (node->symbol.decl))
{
/* Inline clones can not be part of boundary.
gcc_assert (!node->global.inlined_to);
@@ -575,6 +575,7 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, struct varpool_node
FIXME: Alternatively at -Os we may want to avoid generating for them the local
labels and share them across LTRANS partitions. */
if (DECL_IN_CONSTANT_POOL (node->symbol.decl)
+ && !DECL_EXTERNAL (node->symbol.decl)
&& !DECL_COMDAT (node->symbol.decl))
{
bp_pack_value (&bp, 0, 1); /* used_from_other_parition. */
@@ -585,7 +586,8 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, struct varpool_node
bp_pack_value (&bp, node->analyzed
&& referenced_from_other_partition_p (&node->symbol.ref_list,
set, vset), 1);
- bp_pack_value (&bp, boundary_p, 1); /* in_other_partition. */
+ bp_pack_value (&bp, boundary_p && !DECL_EXTERNAL (node->symbol.decl), 1);
+ /* in_other_partition. */
}
streamer_write_bitpack (&bp);
if (node->alias_of)