> Hello. > > Following patch triggers hash calculation of items (functions and variables) > in situations where LTO mode is not utilized. > > Patch survives regression tests and bootstraps on x86_64-linux-pc. > > Ready for trunk? > Thanks, > Martin
> >From 62266e21a89777c6dbd680f7c87f15abe603c024 Mon Sep 17 00:00:00 2001 > From: marxin <mli...@suse.cz> > Date: Thu, 5 Nov 2015 18:31:31 +0100 > Subject: [PATCH] Fix PR ipa/68035 > > gcc/testsuite/ChangeLog: > > 2015-11-05 Martin Liska <mli...@suse.cz> > > * gcc.dg/ipa/pr68035.c: New test. > > gcc/ChangeLog: > > 2015-11-05 Martin Liska <mli...@suse.cz> > > PR ipa/68035 > * ipa-icf.c (sem_item_optimizer::build_graph): Force building > of a hash value for an item if we are not running in LTO mode. > --- > gcc/ipa-icf.c | 4 ++ > gcc/testsuite/gcc.dg/ipa/pr68035.c | 108 > +++++++++++++++++++++++++++++++++++++ > 2 files changed, 112 insertions(+) > create mode 100644 gcc/testsuite/gcc.dg/ipa/pr68035.c > > diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c > index 7bb3af5..09c42a1 100644 > --- a/gcc/ipa-icf.c > +++ b/gcc/ipa-icf.c > @@ -2744,6 +2744,10 @@ sem_item_optimizer::build_graph (void) > { > sem_item *item = m_items[i]; > m_symtab_node_map.put (item->node, item); > + > + /* Initialize hash values if we are not in LTO mode. */ > + if (!in_lto_p) > + item->get_hash (); > } Hmm, what is the difference to the LTO mode here. I would have expected that all the items was analyzed in both paths? Honza