2018-01-06 Martin Sebor <msebor@redhat.com>
commit209394793cce52892ec4d5364e3d63073b2a5d7b
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 Jan 2018 04:19:35 +0000 (7 04:19 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 Jan 2018 04:19:35 +0000 (7 04:19 +0000)
tree089e39031abaa2049faac69072192fed7554808a
parent3b25b53c7f08068cce9651b742441d41b96515d7
2018-01-06  Martin Sebor  <msebor@redhat.com>

PR tree-optimization/83640
* gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
subtracting negative offset from size.
(builtin_access::overlap): Adjust offset bounds of the access to fall
within the size of the object if possible.

PR tree-optimization/83640
* gcc.dg/Wrestrict-6.c: New test.
* gcc.dg/pr83640.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256319 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gimple-ssa-warn-restrict.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wrestrict-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr83640.c [new file with mode: 0644]