re PR lto/65012 (systemd fails to build at least on ppc64el, powerpc, arm-inux-gnueab...
authorJakub Jelinek <jakub@redhat.com>
Thu, 19 Feb 2015 11:56:00 +0000 (12:56 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 19 Feb 2015 11:56:00 +0000 (12:56 +0100)
PR lto/65012
* varpool.c (varpool_node::get_constructor): Return early
if this->lto_file_data is NULL.

From-SVN: r220810

gcc/ChangeLog
gcc/varpool.c

index 8c57f97564d26048ed708dddf57125f319c5cc22..a3045581944c1d3fd55e5db7e3f3f103e50120d3 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-19  Jakub Jelinek  <jakub@redhat.com>
+
+       PR lto/65012
+       * varpool.c (varpool_node::get_constructor): Return early
+       if this->lto_file_data is NULL.
+
 2015-02-19  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
 
         * haifa-sched.c (enum rfs_decision, rfs_str): Remove RFS_DEBUG.
index 3135985740528a9c69a45efdd5aa5dc335d4e228..707f62f0d848d04a30ddcd50ee2212ab4dcf9d82 100644 (file)
@@ -303,7 +303,8 @@ varpool_node::get_constructor (void)
   size_t len;
 
   if (DECL_INITIAL (decl) != error_mark_node
-      || !in_lto_p)
+      || !in_lto_p
+      || !lto_file_data)
     return DECL_INITIAL (decl);
 
   timevar_push (TV_IPA_LTO_CTORS_IN);