aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-12-08 15:53:39 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-12-08 15:53:39 +0000
commitacd3f1c2d42590783e6b62a811f2886f4cc2c79b (patch)
tree59abfddfdd610c6f7ba56eceb9d09ea2447fa736
parent54441a34e7aebb64613ee1105548c55769b93791 (diff)
downloadgcc-acd3f1c2d42590783e6b62a811f2886f4cc2c79b.zip
gcc-acd3f1c2d42590783e6b62a811f2886f4cc2c79b.tar.gz
gcc-acd3f1c2d42590783e6b62a811f2886f4cc2c79b.tar.bz2
lto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of variables in the global contant pool.
* lto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of variables in the global contant pool. From-SVN: r194324
-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 33f7597..96fe2ec 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 0bddb3d..853b155 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;