From 176ca71c8c4ebb554dddef6ea1a6a855b117d6e2 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 19 Feb 2015 12:56:00 +0100 Subject: [PATCH] re PR lto/65012 (systemd fails to build at least on ppc64el, powerpc, arm-inux-gnueabihf and aarch64 with -flto (ICE)) PR lto/65012 * varpool.c (varpool_node::get_constructor): Return early if this->lto_file_data is NULL. From-SVN: r220810 --- gcc/ChangeLog | 6 ++++++ gcc/varpool.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8c57f97564d..a3045581944 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-02-19 Jakub Jelinek + + PR lto/65012 + * varpool.c (varpool_node::get_constructor): Return early + if this->lto_file_data is NULL. + 2015-02-19 Maxim Kuvyrkov * haifa-sched.c (enum rfs_decision, rfs_str): Remove RFS_DEBUG. diff --git a/gcc/varpool.c b/gcc/varpool.c index 31359857405..707f62f0d84 100644 --- a/gcc/varpool.c +++ b/gcc/varpool.c @@ -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); -- 2.30.2