This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v2 of PATCH 06/14] Strip location wrappers in operand_equal_p
- From: Jakub Jelinek <jakub at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, Nathan Sidwell <nathan at acm dot org>, Richard Biener <richard dot guenther at gmail dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 18 Dec 2017 09:00:39 +0100
- Subject: Re: [v2 of PATCH 06/14] Strip location wrappers in operand_equal_p
- Authentication-results: sourceware.org; auth=none
- References: <8533d574-bf9b-54f6-2683-bcd6fc813b56@redhat.com> <1513562874-38507-1-git-send-email-dmalcolm@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Dec 17, 2017 at 09:07:54PM -0500, David Malcolm wrote:
> What do you think?
>
> Successfully bootstrapped®rtested on x86_64-pc-linux-gnu, as
> part of the kit.
>
> gcc/ChangeLog:
> * fold-const.c (operand_equal_p): Strip any location wrappers,
> before computing hashes.
> ---
> gcc/fold-const.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/gcc/fold-const.c b/gcc/fold-const.c
> index 0f11076..2b938900 100644
> --- a/gcc/fold-const.c
> +++ b/gcc/fold-const.c
> @@ -2804,6 +2804,9 @@ combine_comparisons (location_t loc,
> int
> operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
> {
> + STRIP_ANY_LOCATION_WRAPPER (arg0);
> + STRIP_ANY_LOCATION_WRAPPER (arg1);
> +
Certainly not at this spot.
The checking that hashing ignores the location wrappers needs to be done
first. And inchash:add_expr needs to ignore those.
Jakub