aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2007-12-30 04:31:52 +0000
committerNathan Froyd <froydnj@codesourcery.com>2007-12-30 04:31:52 +0000
commit0e58b43b5ef11adac4d6d880237c5dba6172ed30 (patch)
treedc2dc1abc9cc1fc264729c7e9bf25c4f0a2a68cf
parent623685e677019796e8213021963b655eef240e03 (diff)
* lto-read.c (input_expr_operand): Mark static and external
VAR_DECLs as needed. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@131229 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/lto/ChangeLog5
-rw-r--r--gcc/lto/lto-read.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 6c38483cf34..69612f0ec39 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,5 +1,10 @@
2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
+ * lto-read.c (input_expr_operand): Mark static and external
+ VAR_DECLs as needed.
+
+2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
+
* lto-read.c (input_integer): Use the correct shift amount.
2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
diff --git a/gcc/lto/lto-read.c b/gcc/lto/lto-read.c
index 2ab8d5c99a3..4b3a1ce4eb7 100644
--- a/gcc/lto/lto-read.c
+++ b/gcc/lto/lto-read.c
@@ -765,8 +765,11 @@ input_expr_operand (struct input_block *ib, struct data_in *data_in,
case VAR_DECL:
case PARM_DECL:
if (tag == LTO_var_decl1)
- /* Static or externs are here. */
- result = data_in->var_decls [input_uleb128 (ib)];
+ {
+ /* Static or externs are here. */
+ result = data_in->var_decls [input_uleb128 (ib)];
+ varpool_mark_needed_node (varpool_node (result));
+ }
else
{
/* Locals are here. */