diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2018-03-21 20:52:15 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-03-21 20:52:15 +0000 |
commit | 535808fd722db576f0f14424bc083fbef183fd4b (patch) | |
tree | 46261783cb3e754715a50c28c60d025fc28af544 /gcc/tree-cfg.c | |
parent | e215422f1d6c69ae23b09de85a97bb3925cc5bfe (diff) | |
download | gcc-535808fd722db576f0f14424bc083fbef183fd4b.zip gcc-535808fd722db576f0f14424bc083fbef183fd4b.tar.gz gcc-535808fd722db576f0f14424bc083fbef183fd4b.tar.bz2 |
poly_span_traits fixes (PR 84811)
This patch fixes incorrect results for HOST_WIDE_INT positions
at opposite extremes when used with HOST_WIDE_INT sizes. It also
fixes UB when comparing such positions with unsigned HOST_WIDE_INT
sizes (although the results in that case were wrapv-correct).
2018-03-20 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
PR tree-optimization/84811
* poly-int.h (poly_span_traits): Remove the T3 parameter and
promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
(maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
(known_subrange_p): Update accordingly. Cast each value involved
in the size comparison, rather than casting the result of the
subtraction.
gcc/testsuite/
PR tree-optimization/84811
* gcc.dg/torture/pr84811.c: New test.
From-SVN: r258743
Diffstat (limited to 'gcc/tree-cfg.c')
0 files changed, 0 insertions, 0 deletions