From 74ca1c01d02e548f32aa26f9a887dcc0730703fb Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 26 Oct 2018 09:23:33 +0200 Subject: [PATCH] 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. From-SVN: r265521 --- gcc/ChangeLog | 6 ++++++ gcc/ipa-prop.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a2ba3aa7a5..b60988c910e 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 1e40997c92c..4bd0b4b4541 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 -- 2.30.2