Relax hash function to match equals function behavior (PR testsuite/86158).

2018-10-26  Martin Liska  <mliska@suse.cz>

	PR testsuite/86158
	* ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
	addr_expr and not with pointers.

From-SVN: r265521
This commit is contained in:
Martin Liska 2018-10-26 09:23:33 +02:00 committed by Martin Liska
parent b322cdb21a
commit 74ca1c01d0
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2018-10-26 Martin Liska <mliska@suse.cz>
PR testsuite/86158
* ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
addr_expr and not with pointers.
2018-10-26 Jan Hubicka <jh@suse.cz>
* tree.c (free_lang_data_in_type): Only check main variants.

View File

@ -115,8 +115,8 @@ struct ipa_vr_ggc_hash_traits : public ggc_cache_remove <value_range *>
{
gcc_checking_assert (!p->equiv ());
inchash::hash hstate (p->kind ());
hstate.add_ptr (p->min ());
hstate.add_ptr (p->max ());
inchash::add_expr (p->min (), hstate);
inchash::add_expr (p->max (), hstate);
return hstate.end ();
}
static bool