aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-12-08 15:53:39 +0000
committerEric Botcazou <ebotcazou@adacore.com>2012-12-08 15:53:39 +0000
commitccd622ec7ef370707547e9f97242f79f3ab9e65a (patch)
tree59abfddfdd610c6f7ba56eceb9d09ea2447fa736
parent9019c60aa8bf1dc759288aa48727f4cf8711226f (diff)
* lto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of
variables in the global contant pool. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@194324 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/lto-streamer-out.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 33f75979b0f..96fe2ecee59 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * lto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of
+ variables in the global contant pool.
+
2012-12-08 Steven Bosscher <steven@gcc.gnu.org>
PR rtl-optimization/55158
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 0bddb3dfcbb..853b155a3af 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -328,6 +328,7 @@ lto_write_tree (struct output_block *ob, tree expr, bool ref_p)
tree initial = DECL_INITIAL (expr);
if (TREE_CODE (expr) == VAR_DECL
&& (TREE_STATIC (expr) || DECL_EXTERNAL (expr))
+ && !DECL_IN_CONSTANT_POOL (expr)
&& initial)
{
lto_symtab_encoder_t encoder;