From 9ed6dbeeb285a010d4ab1e437cf4e2f7136dcc17 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 29 Aug 2018 12:48:50 +0200 Subject: [PATCH] Fix thinko in lto.c (PR bootstrap/87130). 2018-08-29 Martin Liska PR bootstrap/87130 * lto.c (read_cgraph_and_symbols): Fix thinko, revert to behavior before r263887. From-SVN: r263950 --- gcc/lto/ChangeLog | 6 ++++++ gcc/lto/lto.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index e0bd7c1027e..f997f03ed88 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,9 @@ +2018-08-29 Martin Liska + + PR bootstrap/87130 + * lto.c (read_cgraph_and_symbols): Fix thinko, revert + to behavior before r263887. + 2018-08-27 Martin Liska * lto-lang.c (handle_const_attribute): Use new function diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 5b92bee026e..598492df527 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -2923,8 +2923,8 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) FOR_EACH_SYMBOL (snode) if (snode->externally_visible && snode->real_symbol_p () && snode->lto_file_data && snode->lto_file_data->resolution_map - && !(TREE_CODE (snode->decl) != FUNCTION_DECL - || fndecl_built_in_p (snode->decl)) + && !(TREE_CODE (snode->decl) == FUNCTION_DECL + && fndecl_built_in_p (snode->decl)) && !(VAR_P (snode->decl) && DECL_HARD_REGISTER (snode->decl))) { ld_plugin_symbol_resolution_t *res; -- 2.30.2