lto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of variables in...
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 8 Dec 2012 15:53:39 +0000 (15:53 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 8 Dec 2012 15:53:39 +0000 (15:53 +0000)
* lto-streamer-out.c (lto_write_tree): Do not reset the DECL_INITIAL of
variables in the global contant pool.

From-SVN: r194324

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

index 33f75979b0fae9993888f4af2909ebff2016da86..96fe2ecee59ab719a0df32faaf8f74686157f2da 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 0bddb3dfcbbf578068033015cddcf8ab22228e11..853b155a3afffbda7c384b858efccd45aee2cf8d 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;