From 77efc5c25c487ce50ff94bdee7494c6a87fda4f1 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Thu, 17 Jan 2019 22:52:47 +0000 Subject: PR middle-end/88273 - [8/9 Regression] warning: 'memcpy' offset [-527, -529] PR middle-end/88273 - [8/9 Regression] warning: 'memcpy' offset [-527, -529] is out of the bounds [0, 16] gcc/ChangeLog: PR middle-end/88273 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): Handle anti-ranges the same as no range at all. gcc/testsuite/ChangeLog: PR middle-end/88273 * gcc.dg/Warray-bounds-38.c: New test. From-SVN: r268048 --- gcc/gimple-ssa-warn-restrict.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'gcc/gimple-ssa-warn-restrict.c') diff --git a/gcc/gimple-ssa-warn-restrict.c b/gcc/gimple-ssa-warn-restrict.c index 42c87190..b069f3a 100644 --- a/gcc/gimple-ssa-warn-restrict.c +++ b/gcc/gimple-ssa-warn-restrict.c @@ -319,13 +319,9 @@ builtin_memref::extend_offset_range (tree offset) offrange[0] += offset_int::from (min, SIGNED); offrange[1] += offset_int::from (max, SIGNED); } - else if (rng == VR_ANTI_RANGE) - { - offrange[0] += offset_int::from (max + 1, SIGNED); - offrange[1] += offset_int::from (min - 1, SIGNED); - } else { + /* Handle an anti-range the same as no range at all. */ gimple *stmt = SSA_NAME_DEF_STMT (offset); tree type; if (is_gimple_assign (stmt) -- cgit v1.1