* lto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 8 Dec 2012 15:53:39 +0000 (15:53 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 8 Dec 2012 15:53:39 +0000 (15:53 +0000)
variables in the global contant pool.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194324 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/lto-streamer-out.c

index 33f7597..96fe2ec 100644 (file)
@@ -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
index 0bddb3d..853b155 100644 (file)
@@ -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;