This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v2 of PATCH 06/14] Strip location wrappers in operand_equal_p


On Sun, Dec 17, 2017 at 09:07:54PM -0500, David Malcolm wrote:
> What do you think?
> 
> Successfully bootstrapped&regrtested 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]