PR middle-end/94940 - spurious -Warray-bounds for a zero length array member of union
authorMartin Sebor <msebor@redhat.com>
Mon, 18 May 2020 21:07:48 +0000 (15:07 -0600)
committerMartin Sebor <msebor@redhat.com>
Mon, 18 May 2020 21:07:48 +0000 (15:07 -0600)
commit3956244c58acceebf1ef2cf9a63e99f0f82abcb7
tree8f8e1b8c745a4a28fe13858fa9714341af118a59
parent628bb8040858e0b3446e5f6740c0c0f557d3abdc
PR middle-end/94940 - spurious -Warray-bounds for a zero length array member of union

gcc/testsuite/ChangeLog:

PR middle-end/94940
* gcc.dg/Warray-bounds-61.c: New test.

gcc/ChangeLog:

PR middle-end/94940
* tree-vrp.c (vrp_prop::check_mem_ref): Remove unreachable code.
* tree.c (component_ref_size): Correct the handling or array members
of unions.
Drop a pointless test.
Rename a local variable.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Warray-bounds-61.c [new file with mode: 0644]
gcc/tree-vrp.c
gcc/tree.c