[Bug middle-end/94940] [10 Regression] spurious -Warray-bounds for a zero length array member of union since r10-4300-g49fb45c81f4ac068

2020-05-18 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94940

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Martin Sebor  ---
Fixed for GCC 11 and 10.2.

[Bug middle-end/94940] [10 Regression] spurious -Warray-bounds for a zero length array member of union since r10-4300-g49fb45c81f4ac068

2020-05-18 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94940

--- Comment #10 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Martin Sebor
:

https://gcc.gnu.org/g:ff61c5bd1490a006c00bed9259dc672351eb217a

commit r10-8154-gff61c5bd1490a006c00bed9259dc672351eb217a
Author: Martin Sebor 
Date:   Mon May 18 16:04:56 2020 -0600

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.