From: marxin Date: Fri, 26 Oct 2018 07:23:33 +0000 (+0000) Subject: Relax hash function to match equals function behavior (PR testsuite/86158). X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=018d6175e2c3d6a2cf7fd438c0878ec1f4c93cb9;p=thirdparty%2Fgcc.git Relax hash function to match equals function behavior (PR testsuite/86158). 2018-10-26 Martin Liska PR testsuite/86158 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with addr_expr and not with pointers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265521 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a2ba3aa7a5a..b60988c910e4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-10-26 Martin Liska + + 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 * tree.c (free_lang_data_in_type): Only check main variants. diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 1e40997c92c1..4bd0b4b45410 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -115,8 +115,8 @@ struct ipa_vr_ggc_hash_traits : public ggc_cache_remove { 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