re PR tree-optimization/83640 (ICE in generic_overlap, at gimple-ssa-warn-restrict...
authorMartin Sebor <msebor@redhat.com>
Sun, 7 Jan 2018 04:19:35 +0000 (04:19 +0000)
committerJeff Law <law@gcc.gnu.org>
Sun, 7 Jan 2018 04:19:35 +0000 (21:19 -0700)
commitf59d40267ba8eb4e938c02d1a8a0c890cbf1f359
tree089e39031abaa2049faac69072192fed7554808a
parent9ea52d27eca0c56c88a3941b413ef56950d9f5c3
re PR tree-optimization/83640 (ICE in generic_overlap, at gimple-ssa-warn-restrict.c:814)

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.

From-SVN: r256319
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]