]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR lto/44812 (m32 lto produces non-relocatable subtraction expression errors)
authorJan Hubicka <jh@suse.cz>
Fri, 3 Sep 2010 12:26:24 +0000 (14:26 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 3 Sep 2010 12:26:24 +0000 (12:26 +0000)
PR lto/44812
* lto-cgraph.c (intput_node, input_varpool_node): Set DECL_EXTERNAL
on functions/variables in other partition.

From-SVN: r163811

gcc/ChangeLog
gcc/lto-cgraph.c

index 612e0205399d673f1331b2c8ed022edf40691d76..cf3a172ea66daf009fcc749b820166f206d25d9f 100644 (file)
@@ -1,3 +1,9 @@
+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.
index dac5c3218149acb5ca96a00e6f0e1c6baf693c7d..78c809b55209c3c8888706eae39666b6bbfbd627 100644 (file)
@@ -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);