diff options
author | Martin Sebor <msebor@redhat.com> | 2017-12-18 03:31:05 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2017-12-17 20:31:05 -0700 |
commit | 56735d40cafbfb1cf1d4bb052480372b020d98f5 (patch) | |
tree | 9990691398d0dd363ddc5bdd23fddbcce5f3e51f /gcc/gimple-ssa-warn-restrict.c | |
parent | bfecb9de2d882681278a9b4525566f665605312d (diff) |
PR bootstrap/83446 - Bootstrap failed on i686
gcc/testsuite/ChangeLog:
PR bootstrap/83446
* c-c++-common/Warray-bounds-3.c: Adjust.
* gcc.dg/Warray-bounds-25.c: New test.
gcc/ChangeLog:
PR bootstrap/83446
* gimple-ssa-warn-restrict.c
(builtin_memref::offset_out_of_bounds): Correct the handling of
anti-ranges.
From-SVN: r255772
Diffstat (limited to 'gcc/gimple-ssa-warn-restrict.c')
-rw-r--r-- | gcc/gimple-ssa-warn-restrict.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/gimple-ssa-warn-restrict.c b/gcc/gimple-ssa-warn-restrict.c index f524e1dc3d5..4d424735d2a 100644 --- a/gcc/gimple-ssa-warn-restrict.c +++ b/gcc/gimple-ssa-warn-restrict.c @@ -413,7 +413,9 @@ builtin_memref::offset_out_of_bounds (int strict, offset_int ooboff[2]) const if (DECL_P (base) && TREE_CODE (TREE_TYPE (base)) == ARRAY_TYPE) { - if (offrng[1] < offrng[0]) + /* Check for offset in an anti-range with a negative lower bound. + For such a range, consider only the non-negative subrange. */ + if (offrng[1] < offrng[0] && offrng[1] < 0) offrng[1] = maxobjsize; } |