https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114014
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Uecker <uec...@gcc.gnu.org>:

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

commit r15-6170-gd46c7f313b5a30ee04080f249e31e12987d50aa2
Author: Martin Uecker <uec...@tugraz.at>
Date:   Sat Nov 23 08:04:05 2024 +0100

    Fix type compatibility for types with flexible array member 2/2
[PR113688,PR114713,PR117724]

    For checking or computing TYPE_CANONICAL, ignore the array size when it is
    the last element of a structure or union.  To not get errors because of
    an inconsistent number of members, zero-sized arrays which are the last
    element are not ignored anymore when checking the fields of a struct.

            PR c/113688
            PR c/114014
            PR c/114713
            PR c/117724

    gcc/ChangeLog:
            * tree.cc (gimple_canonical_types_compatible_p): Add exception.

    gcc/lto/ChangeLog:
            * lto-common.cc (hash_canonical_type): Add exception.

    gcc/testsuite/ChangeLog:
            * gcc.dg/pr113688.c: New test.
            * gcc.dg/pr114014.c: New test.
            * gcc.dg/pr114713.c: New test.
            * gcc.dg/pr117724.c: New test.

Reply via email to