aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/lto-cgraph.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 612e020..cf3a172 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2010-09-03 Jan Hubicka <jh@suse.cz>
+ PR lto/44812
+ * lto-cgraph.c (intput_node, input_varpool_node): Set DECL_EXTERNAL
+ on functions/variables in other partition.
+
+2010-09-03 Jan Hubicka <jh@suse.cz>
+
* cgraph.h (struct varpool_node): Add const_value_known.
(varpool_decide_const_value_known): Declare.
* tree-ssa-ccp.c (fold_const_aggregate_ref): Update initializer folding.
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index dac5c32..78c809b 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);