summaryrefslogtreecommitdiff
path: root/gcc/lto-cgraph.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-03 12:26:24 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-03 12:26:24 +0000
commiteb0bc81b82b2117e3def2f0ddc7f27491d8b332e (patch)
treedb9a72d948f2aa5928b799505c9be36231f780c8 /gcc/lto-cgraph.c
parent526d67708cbebe30d6b2bcb527525f555d1dcbd1 (diff)
downloadgcc-eb0bc81b82b2117e3def2f0ddc7f27491d8b332e.tar.gz
PR lto/44812
* lto-cgraph.c (intput_node, input_varpool_node): Set DECL_EXTERNAL on functions/variables in other partition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163811 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r--gcc/lto-cgraph.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index dac5c321814..78c809b5520 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -953,6 +953,11 @@ input_overwrite_node (struct lto_file_decl_data *file_data,
node->lowered = bp_unpack_value (bp, 1);
node->analyzed = tag == LTO_cgraph_analyzed_node;
node->in_other_partition = bp_unpack_value (bp, 1);
+ if (node->in_other_partition)
+ {
+ DECL_EXTERNAL (node->decl) = 1;
+ TREE_STATIC (node->decl) = 0;
+ }
node->alias = bp_unpack_value (bp, 1);
node->finalized_by_frontend = bp_unpack_value (bp, 1);
node->frequency = (enum node_frequency)bp_unpack_value (bp, 2);
@@ -1111,6 +1116,11 @@ input_varpool_node (struct lto_file_decl_data *file_data,
node->analyzed = node->finalized;
node->used_from_other_partition = bp_unpack_value (&bp, 1);
node->in_other_partition = bp_unpack_value (&bp, 1);
+ if (node->in_other_partition)
+ {
+ DECL_EXTERNAL (node->decl) = 1;
+ TREE_STATIC (node->decl) = 0;
+ }
aliases_p = bp_unpack_value (&bp, 1);
if (node->finalized)
varpool_mark_needed_node (node);