https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86616

            Bug ID: 86616
           Summary: [9 regression] c-c++-common/Warray-bounds-2.c fails
                    starting with r262893
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

This test cases needs updating with this revision

> FAIL: c-c++-common/Warray-bounds-2.c  -Wc++-compat  (test for excess errors)
> FAIL: c-c++-common/Warray-bounds-2.c  -std=gnu++11 (test for excess errors)
> FAIL: c-c++-common/Warray-bounds-2.c  -std=gnu++14 (test for excess errors)
> FAIL: c-c++-common/Warray-bounds-2.c  -std=gnu++98 (test for excess errors)

One example:

spawn -ignore SIGHUP
/home/seurer/gcc/build/gcc-trunk/gcc/testsuite/g++/../../xg++
-B/home/seurer/gcc/build/gcc-trunk/gcc/testsuite/g++/../../
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -nostdinc++
-I/home/seurer/gcc/build/gcc-trunk/powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu
-I/home/seurer/gcc/build/gcc-trunk/powerpc64-unknown-linux-gnu/libstdc++-v3/include
-I/home/seurer/gcc/gcc-trunk/libstdc++-v3/libsupc++
-I/home/seurer/gcc/gcc-trunk/libstdc++-v3/include/backward
-I/home/seurer/gcc/gcc-trunk/libstdc++-v3/testsuite/util -fmessage-length=0
-std=gnu++98 -O2 -Warray-bounds -Wno-stringop-overflow -S -o Warray-bounds-2.s
In function 'void wrap_memcpy_src_xsize(char*, const char*, ptrdiff_t,
size_t)',
    inlined from 'void call_memcpy_src_xsize(char*, size_t)' at
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:37:25:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:30:10:
warning: 'void* memcpy(void*, const void*, size_t)' offset 46 is out of the
bounds [0, 45] of object 'ar' with type 'Array' [-Warray-bounds]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c: In
function 'void call_memcpy_src_xsize(char*, size_t)':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:35:16:
note: 'ar' declared here
In function 'void wrap_memcpy_src_diff_max(char*, const char*, ptrdiff_t,
size_t)',
    inlined from 'void call_memcpy_src_diff_max(char*, const char*, size_t)' at
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:51:28:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:46:10:
warning: 'void* memcpy(void*, const void*, size_t)' pointer overflow between
offset 9223372036854775807 and size 3 [-Warray-bounds]
In function 'void wrap_memcpy_dst_xsize(char*, const char*, ptrdiff_t,
size_t)',
    inlined from 'void call_memcpy_dst_xsize(const char*, size_t)' at
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:64:25:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:57:10:
warning: 'void* memcpy(void*, const void*, size_t)' offset 47 is out of the
bounds [0, 45] of object 'ar1' with type 'Array' [-Warray-bounds]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c: In
function 'void call_memcpy_dst_xsize(const char*, size_t)':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:62:16:
note: 'ar1' declared here
In function 'void wrap_memcpy_dst_diff_max(char*, const char*, ptrdiff_t,
size_t)',
    inlined from 'void call_memcpy_dst_diff_max(const char*, size_t)' at
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:78:28:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:71:10:
warning: 'void* memcpy(void*, const void*, size_t)' offset -9223372036854775796
is out of the bounds [0, 45] of object 'ar2' with type 'Array' [-Warray-bounds]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c: In
function 'void call_memcpy_dst_diff_max(const char*, size_t)':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:76:16:
note: 'ar2' declared here
In function 'void wrap_strcat_src_xsize(char*, const char*, ptrdiff_t)',
    inlined from 'void call_strcat_src_xsize(char*)' at
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:92:25:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:85:10:
warning: 'char* strcat(char*, const char*)' offset 46 is out of the bounds [0,
45] of object 'ar3' with type 'Array' [-Warray-bounds]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c: In
function 'void call_strcat_src_xsize(char*)':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:90:16:
note: 'ar3' declared here
In function 'void wrap_strcat_dst_xsize(char*, const char*, ptrdiff_t)',
    inlined from 'void call_strcat_dst_xsize(const char*)' at
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:105:25:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:98:10:
warning: 'char* strcat(char*, const char*)' offset 47 is out of the bounds [0,
45] of object 'ar4' with type 'Array' [-Warray-bounds]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c: In
function 'void call_strcat_dst_xsize(const char*)':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:103:16:
note: 'ar4' declared here
In function 'void wrap_strcpy_src_xsize(char*, const char*, ptrdiff_t)',
    inlined from 'void call_strcpy_src_xsize(char*)' at
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:119:25:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:112:10:
warning: 'char* strcpy(char*, const char*)' offset 48 is out of the bounds [0,
45] of object 'ar5' with type 'Array' [-Warray-bounds]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c: In
function 'void call_strcpy_src_xsize(char*)':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:117:16:
note: 'ar5' declared here
In function 'void wrap_strcpy_dst_xsize(char*, const char*, ptrdiff_t)',
    inlined from 'void call_strcpy_dst_xsize(const char*)' at
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:132:25:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:125:10:
warning: 'char* strcpy(char*, const char*)' offset 49 is out of the bounds [0,
45] of object 'ar6' with type 'Array' [-Warray-bounds]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c: In
function 'void call_strcpy_dst_xsize(const char*)':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:130:16:
note: 'ar6' declared here
In function 'void wrap_strncpy_src_xsize(char*, const char*, ptrdiff_t,
size_t)',
    inlined from 'void call_strncpy_src_xsize(char*, size_t)' at
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:149:26:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:142:11:
warning: 'char* strncpy(char*, const char*, size_t)' offset 46 is out of the
bounds [0, 45] of object 'ar7' with type 'Array' [-Warray-bounds]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c: In
function 'void call_strncpy_src_xsize(char*, size_t)':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:147:16:
note: 'ar7' declared here
In function 'void wrap_strncpy_dst_xsize(char*, const char*, ptrdiff_t,
size_t)',
    inlined from 'void call_strncpy_dst_xsize(const char*, size_t)' at
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:179:26:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:172:11:
warning: 'char* strncpy(char*, const char*, size_t)' offset 47 is out of the
bounds [0, 45] of object 'ar8' with type 'Array' [-Warray-bounds]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c: In
function 'void call_strncpy_dst_xsize(const char*, size_t)':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:177:16:
note: 'ar8' declared here
In function 'void wrap_strncpy_dst_diff_max(char*, const char*, ptrdiff_t,
size_t)',
    inlined from 'void call_strncpy_dst_diff_max(const char*, size_t)' at
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:193:29:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:186:11:
warning: 'char* strncpy(char*, const char*, size_t)' offset
-9223372036854775781 is out of the bounds [0, 45] of object 'ar9' with type
'Array' [-Warray-bounds]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c: In
function 'void call_strncpy_dst_diff_max(const char*, size_t)':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:191:16:
note: 'ar9' declared here
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c: In
function 'void call_strncpy_dstarray_diff_neg(const char*, size_t)':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:200:11:
warning: array subscript -1 is outside array bounds of 'Array [2]'
[-Warray-bounds]
In function 'void wrap_strncpy_dstarray_diff_neg(char*, const char*, ptrdiff_t,
size_t)',
    inlined from 'void call_strncpy_dstarray_diff_neg(const char*, size_t)' at
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:209:34:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:200:11:
warning: 'char* strncpy(char*, const char*, size_t)' offset -1 is out of the
bounds [0, 90] of object 'ar10' with type 'Array [2]' [-Warray-bounds]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c: In
function 'void call_strncpy_dstarray_diff_neg(const char*, size_t)':
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:205:16:
note: 'ar10' declared here
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 memcpy (test for warnings,
line 30)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 memcpy (test for warnings,
line 46)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 memcpy (test for warnings,
line 57)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98  (test for warnings, line
62)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 memcpy (test for warnings,
line 71)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98  (test for warnings, line
76)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 strcat (test for warnings,
line 85)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98  (test for warnings, line
90)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 strcat (test for warnings,
line 98)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98  (test for warnings, line
103)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 strcpy (test for warnings,
line 112)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98  (test for warnings, line
117)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 strcpy (test for warnings,
line 125)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98  (test for warnings, line
130)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 strncpy (test for warnings,
line 142)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98  (test for warnings, line
147)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 strncpy (test for warnings,
line 172)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98  (test for warnings, line
177)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 strncpy (test for warnings,
line 186)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 strncpy (test for warnings,
line 191)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98 strncpy (test for warnings,
line 200)
PASS: c-c++-common/Warray-bounds-2.c  -std=gnu++98  (test for warnings, line
205)
FAIL: c-c++-common/Warray-bounds-2.c  -std=gnu++98 (test for excess errors)
Excess errors:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Warray-bounds-2.c:200:11:
warning: array subscript -1 is outside array bounds of 'Array [2]'
[-Warray-bounds]

Reply via email to