diff options
author | Martin Liska <mliska@suse.cz> | 2018-10-26 09:23:33 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-10-26 07:23:33 +0000 |
commit | 74ca1c01d02e548f32aa26f9a887dcc0730703fb (patch) | |
tree | e8818d1583456b28743dac749212c9b626261743 | |
parent | b322cdb21a83d2e7ef89058ee56e5a814f916617 (diff) | |
download | gcc-74ca1c01d02e548f32aa26f9a887dcc0730703fb.zip gcc-74ca1c01d02e548f32aa26f9a887dcc0730703fb.tar.gz gcc-74ca1c01d02e548f32aa26f9a887dcc0730703fb.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ipa-prop.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a2ba3a..b60988c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 1e40997..4bd0b4b 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 <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 |