From 4397eb6811e531e0ba44598edba3fe5047b2b9e9 Mon Sep 17 00:00:00 2001 From: rsandifo Date: Mon, 21 Aug 2017 09:46:05 +0000 Subject: [PATCH] Fix bogus CONST_WIDE_INT hash The CONST_WIDE_INT case in const_rtx_hash_1 started the hash with the precision of the mode, but the mode is always VOIDmode. 2017-08-21 Richard Sandiford Alan Hayward David Sherwood gcc/ * varasm.c (const_rtx_hash_1): Don't hash in the mode of a CONST_WIDE_INT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251218 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/varasm.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 213b5c803ab..34ecfdc8188 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-08-21 Richard Sandiford + Alan Hayward + David Sherwood + + * varasm.c (const_rtx_hash_1): Don't hash in the mode of a + CONST_WIDE_INT. + 2017-08-21 Richard Biener PR middle-end/81884 diff --git a/gcc/varasm.c b/gcc/varasm.c index e0834a1ff3b..91680d692b4 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3639,7 +3639,7 @@ const_rtx_hash_1 (const_rtx x) break; case CONST_WIDE_INT: - hwi = GET_MODE_PRECISION (mode); + hwi = 0; { for (i = 0; i < CONST_WIDE_INT_NUNITS (x); i++) hwi ^= CONST_WIDE_INT_ELT (x, i); -- 2.11.4.GIT