PR middle-end/92815 - spurious -Wstringop-overflow writing into a flexible array...
authorMartin Sebor <msebor@redhat.com>
Mon, 18 May 2020 21:24:12 +0000 (15:24 -0600)
committerMartin Sebor <msebor@redhat.com>
Mon, 18 May 2020 21:24:12 +0000 (15:24 -0600)
commit7a41fcde6c67faafab8c8ee2a31140999383dcef
tree05c39a4f7d249ebd4878d1b392aa0ba747a96a85
parent3956244c58acceebf1ef2cf9a63e99f0f82abcb7
PR middle-end/92815 - spurious -Wstringop-overflow writing into a flexible array of an extern struct

gcc/ChangeLog:

PR middle-end/92815
* tree-object-size.c (decl_init_size): New function.
(addr_object_size): Call it.
* tree.h (last_field): Declare.
(first_field): Add attribute nonnull.

gcc/testsuite/ChangeLog:

PR middle-end/92815
* gcc.dg/Warray-bounds-56.c: Remove xfails.
* gcc.dg/builtin-object-size-20.c: New test.
* gcc.dg/builtin-object-size-21.c: New test.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Warray-bounds-56.c
gcc/testsuite/gcc.dg/builtin-object-size-20.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/builtin-object-size-21.c [new file with mode: 0644]
gcc/tree-object-size.c
gcc/tree.h