[Bug testsuite/89771] New: [9 regression] c-c++-common/Wrestrict.c fails starting with r269807
seurer at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 19 20:21:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89771
Bug ID: 89771
Summary: [9 regression] c-c++-common/Wrestrict.c fails starting
with r269807
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: ---
There are a whole bunch of new failures from this test case starting with
r269807.
------------------------------------------------------------------------
r269807 | msebor | 2019-03-19 12:45:34 -0500 (Tue, 19 Mar 2019) | 14 lines
PR tree-optimization/89644 - False-positive -Warray-bounds diagnostic on
strncpy
gcc/ChangeLog:
PR tree-optimization/89644
* tree-ssa-strlen.c (handle_builtin_stxncpy): Consider unterminated
arrays in determining sequence sizes in strncpy and stpncpy.
gcc/testsuite/ChangeLog:
PR tree-optimization/89644
* gcc.dg/Wstringop-truncation-8.c: New test.
Some of the excess errors:
Excess errors:
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:811:3:
warning: 'strncpy' accessing 4 bytes at offsets 0 and 1 overlaps 2 bytes at
offset 1 [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:812:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and 1 overlaps 2 bytes at
offset 1 [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:813:3:
warning: 'strncpy' accessing 6 bytes at offsets 0 and 1 overlaps 2 bytes at
offset 1 [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:819:3:
warning: 'strncpy' accessing 4 bytes at offsets 0 and 2 overlaps 1 byte at
offset 2 [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:820:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and 2 overlaps 1 byte at
offset 2 [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:827:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and 2 overlaps 2 bytes at
offset 2 [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:828:3:
warning: 'strncpy' accessing 6 bytes at offsets 0 and 2 overlaps 2 bytes at
offset 2 [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:867:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and [1, 5] may overlap up to
3 bytes at offset [3, 1] [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:875:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and [2, 5] may overlap up to
2 bytes at offset [3, 2] [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:876:3:
warning: 'strncpy' accessing 6 bytes at offsets 0 and [2, 5] may overlap up to
2 bytes at offset [3, 2] [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:884:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and [3, 5] may overlap 1 byte
at offset 3 [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:885:3:
warning: 'strncpy' accessing 6 bytes at offsets 0 and [3, 5] may overlap 1 byte
at offset 3 [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:893:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and [4, 5] may overlap up to
0 bytes at offset [9223372036854775807, -9223372036854775808] [-Wrestrict]
/home/seurer/gcc/gcc-trunk/gcc/testsuite/c-c++-common/Wrestrict.c:894:3:
warning: 'strncpy' accessing 6 bytes at offsets 0 and [4, 5] may overlap up to
0 bytes at offset [9223372036854775807, -9223372036854775808] [-Wrestrict]
diff between r269806's and r267807's output for one run:
131,133c131,133
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:811:3:
warning: 'strncpy' accessing 4 bytes at offsets 0 and 1 overlaps 3 bytes at
offset 1 [-Wrestrict]
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:812:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and 1 overlaps 3 bytes at
offset 1 [-Wrestrict]
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:813:3:
warning: 'strncpy' accessing 6 bytes at offsets 0 and 1 overlaps 3 bytes at
offset 1 [-Wrestrict]
---
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:811:3: warning: 'strncpy' accessing 4 bytes at offsets 0 and 1 overlaps 2 bytes at offset 1 [-Wrestrict]
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:812:3: warning: 'strncpy' accessing 5 bytes at offsets 0 and 1 overlaps 2 bytes at offset 1 [-Wrestrict]
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:813:3: warning: 'strncpy' accessing 6 bytes at offsets 0 and 1 overlaps 2 bytes at offset 1 [-Wrestrict]
135,136c135,136
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:819:3:
warning: 'strncpy' accessing 4 bytes at offsets 0 and 2 overlaps 2 bytes at
offset 2 [-Wrestrict]
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:820:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and 2 overlaps 2 bytes at
offset 2 [-Wrestrict]
---
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:819:3: warning: 'strncpy' accessing 4 bytes at offsets 0 and 2 overlaps 1 byte at offset 2 [-Wrestrict]
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:820:3: warning: 'strncpy' accessing 5 bytes at offsets 0 and 2 overlaps 1 byte at offset 2 [-Wrestrict]
139,140c139,140
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:827:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and 2 overlaps 3 bytes at
offset 2 [-Wrestrict]
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:828:3:
warning: 'strncpy' accessing 6 bytes at offsets 0 and 2 overlaps 3 bytes at
offset 2 [-Wrestrict]
---
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:827:3: warning: 'strncpy' accessing 5 bytes at offsets 0 and 2 overlaps 2 bytes at offset 2 [-Wrestrict]
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:828:3: warning: 'strncpy' accessing 6 bytes at offsets 0 and 2 overlaps 2 bytes at offset 2 [-Wrestrict]
148c148
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:867:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and [1, 5] may overlap up to
4 bytes at offset [4, 1] [-Wrestrict]
---
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:867:3: warning: 'strncpy' accessing 5 bytes at offsets 0 and [1, 5] may overlap up to 3 bytes at offset [3, 1] [-Wrestrict]
151,152c151,152
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:875:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and [2, 5] may overlap up to
3 bytes at offset [4, 2] [-Wrestrict]
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:876:3:
warning: 'strncpy' accessing 6 bytes at offsets 0 and [2, 5] may overlap up to
3 bytes at offset [4, 2] [-Wrestrict]
---
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:875:3: warning: 'strncpy' accessing 5 bytes at offsets 0 and [2, 5] may overlap up to 2 bytes at offset [3, 2] [-Wrestrict]
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:876:3: warning: 'strncpy' accessing 6 bytes at offsets 0 and [2, 5] may overlap up to 2 bytes at offset [3, 2] [-Wrestrict]
154,157c154,157
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:884:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and [3, 5] may overlap up to
2 bytes at offset [4, 3] [-Wrestrict]
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:885:3:
warning: 'strncpy' accessing 6 bytes at offsets 0 and [3, 5] may overlap up to
2 bytes at offset [4, 3] [-Wrestrict]
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:893:3:
warning: 'strncpy' accessing 5 bytes at offsets 0 and [4, 5] may overlap 1 byte
at offset 4 [-Wrestrict]
< /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:894:3:
warning: 'strncpy' accessing 6 bytes at offsets 0 and [4, 5] may overlap 1 byte
at offset 4 [-Wrestrict]
---
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:884:3: warning: 'strncpy' accessing 5 bytes at offsets 0 and [3, 5] may overlap 1 byte at offset 3 [-Wrestrict]
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:885:3: warning: 'strncpy' accessing 6 bytes at offsets 0 and [3, 5] may overlap 1 byte at offset 3 [-Wrestrict]
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:893:3: warning: 'strncpy' accessing 5 bytes at offsets 0 and [4, 5] may overlap up to 0 bytes at offset [9223372036854775807, -9223372036854775808] [-Wrestrict]
> /home/seurer/gcc/gcc-test/gcc/testsuite/c-c++-common/Wrestrict.c:894:3: warning: 'strncpy' accessing 6 bytes at offsets 0 and [4, 5] may overlap up to 0 bytes at offset [9223372036854775807, -9223372036854775808] [-Wrestrict]
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
811)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
812)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
813)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
819)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
820)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
827)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
828)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
867)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
875)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
876)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
884)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
885)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
893)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat strncpy (test for warnings, line
894)
FAIL: c-c++-common/Wrestrict.c -Wc++-compat (test for excess errors)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
811)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
812)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
813)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
819)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
820)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
827)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
828)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
867)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
875)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
876)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
884)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
885)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
893)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 strncpy (test for warnings, line
894)
FAIL: c-c++-common/Wrestrict.c -std=gnu++98 (test for excess errors)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
811)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
812)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
813)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
819)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
820)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
827)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
828)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
867)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
875)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
876)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
884)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
885)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
893)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 strncpy (test for warnings, line
894)
FAIL: c-c++-common/Wrestrict.c -std=gnu++14 (test for excess errors)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
811)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
812)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
813)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
819)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
820)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
827)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
828)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
867)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
875)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
876)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
884)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
885)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
893)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 strncpy (test for warnings, line
894)
FAIL: c-c++-common/Wrestrict.c -std=gnu++17 (test for excess errors)
More information about the Gcc-bugs
mailing list