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

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 18 22:05:32 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94940

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Martin Sebor
<msebor@gcc.gnu.org>:

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

commit r10-8154-gff61c5bd1490a006c00bed9259dc672351eb217a
Author: Martin Sebor <msebor@redhat.com>
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.


More information about the Gcc-bugs mailing list