]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR lto/60820 (ice in ctor_for_folding, at varpool.c:291)
authorJan Hubicka <hubicka@ucw.cz>
Mon, 14 Apr 2014 17:53:34 +0000 (19:53 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 14 Apr 2014 17:53:34 +0000 (17:53 +0000)
PR lto/60820
* varpool.c (varpool_remove_node): Do not alter decls when streaming.

From-SVN: r209389

gcc/ChangeLog
gcc/varpool.c

index 91bb92fedbe39c6dbd65082156821bc3083223b6..98e37104f62287e8361857369e2bc59eb615acae 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-14  Jan Hubicka   <hubicka@ucw.cz>
+
+       PR lto/60820
+       * varpool.c (varpool_remove_node): Do not alter decls when streaming.
+
 2014-04-14  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.c (examine_argument): Return bool.  Return true if
index acb522100ea96a9a4819a43c66014d49e84c1d6f..b5493ab5a846d097c2f388a51c3e3668bd9a1808 100644 (file)
@@ -166,7 +166,9 @@ varpool_remove_node (varpool_node *node)
   /* Because we remove references from external functions before final compilation,
      we may end up removing useful constructors.
      FIXME: We probably want to trace boundaries better.  */
-  if ((init = ctor_for_folding (node->decl)) == error_mark_node)
+  if (cgraph_state == CGRAPH_LTO_STREAMING)
+    ;
+  else if ((init = ctor_for_folding (node->decl)) == error_mark_node)
     varpool_remove_initializer (node);
   else
     DECL_INITIAL (node->decl) = init;