[PATCH] Fix overflow issues in tree-vrp.c:compare_values, PR25148
Thu Apr 27 13:37:00 GMT 2006
On Thu, 27 Apr 2006, Richard Guenther wrote:
> 2006-04-27 Richard Guenther <email@example.com>
> 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.
More information about the Gcc-patches