diff options
author | Martin Sebor <msebor@redhat.com> | 2018-02-14 23:22:15 +0000 |
---|---|---|
committer | Martin Sebor <msebor@gcc.gnu.org> | 2018-02-14 16:22:15 -0700 |
commit | 816fad6ed44fb327c4034c40eb9d2bccafd6538d (patch) | |
tree | 4abe2f0ee56e212baf1980d760fbb71436a2cbfb /gcc/tree-ssa-strlen.c | |
parent | 7c102986d6f8205ebc3952344c64edbcd7018fbc (diff) | |
download | gcc-816fad6ed44fb327c4034c40eb9d2bccafd6538d.zip gcc-816fad6ed44fb327c4034c40eb9d2bccafd6538d.tar.gz gcc-816fad6ed44fb327c4034c40eb9d2bccafd6538d.tar.bz2 |
PR tree-optimization/83698 - bogus offset in -Wrestrict messages for strcat of unknown strings
gcc/ChangeLog:
PR tree-optimization/83698
* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
arrays constrain the offset range to their bounds.
(builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
(builtin_access::overlap): Avoid setting the size of overlap if it's
already been set.
(maybe_diag_overlap): Also consider arrays when deciding what values
of offsets to include in diagnostics.
gcc/testsuite/ChangeLog:
PR tree-optimization/83698
* gcc.dg/Wrestrict-7.c: New test.
* c-c++-common/Wrestrict.c: Adjust expected values for strcat.
* gcc.target/i386/chkp-stropt-17.c: Same.
From-SVN: r257676
Diffstat (limited to 'gcc/tree-ssa-strlen.c')
0 files changed, 0 insertions, 0 deletions