Fix -Wstringop-overflow regression
authorMichael Matz <matz@suse.de>
Wed, 4 Apr 2018 14:49:06 +0000 (14:49 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Wed, 4 Apr 2018 14:49:06 +0000 (14:49 +0000)
commitf1acdcd066f3ba2a4565a9e8a002af897161483d
tree7e5d7bc4e8ce12d0b5d26478dd6693af9c618432
parenteefecf6546957c92ab0073c0e6072c9554f19566
Fix -Wstringop-overflow regression

we shouldn't claim string overflows for character arrays at
end of structures; the code that tries to avoid these
accidentally passed the address of the accessed member to
array_at_struct_end_p(), but that one wants the component_ref
or array_ref itself.  Needs updating of one testcase that
incorrectly expected warning to occur in this situation.

From-SVN: r259083
gcc/ChangeLog
gcc/builtins.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wstringop-truncation-4.c
gcc/testsuite/gcc.dg/Wstringop-overflow-4.c [new file with mode: 0644]