This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix overflow issues in tree-vrp.c:compare_values, PR25148
- From: Roger Sayle <roger at eyesopen dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 27 Apr 2006 07:03:10 -0600 (MDT)
- Subject: Re: [PATCH] Fix overflow issues in tree-vrp.c:compare_values, PR25148
On Thu, 27 Apr 2006, Richard Guenther wrote:
> 2006-04-27 Richard Guenther <rguenther@suse.de>
>
> PR tree-optimization/25148
> * tree-vrp.c (compare_values): Remove code dealing with
> comparisons against type min/max value. Honour overflow
> and negative constants in code dealing with comparisons
> of plus and minus expressions.
> (value_inside_range): Use fold_binary with LE_EXPR and
> GE_EXPR rather than compare_values.
This is OK for mainline. Please remember to add testcases when you
fix PR25145, to check that this issue remains fixed. For example,
that your example is correctly optimized (or not with -fwrapv).
Thanks for fixing this.
Roger
--