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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Qing Zhao <qinz...@gcc.gnu.org>:

https://gcc.gnu.org/g:12796e6938a6390512e714f635d2c4fdef7023ba

commit r15-10158-g12796e6938a6390512e714f635d2c4fdef7023ba
Author: Qing Zhao <qing.z...@oracle.com>
Date:   Wed Jul 30 14:48:10 2025 +0000

    C: Flex array in the middle via type alias is not reported [PR120353]

    The root cause of the bug is: the TYPE_INCLUDES_FLEXARRAY marking of the
    structure type is not copied to its aliased type.
    The fix is to copy this marking to all the variant types of the current
    structure type.

            PR c/120353

    gcc/c/ChangeLog:

            * c-decl.cc (finish_struct): Copy TYPE_INCLUDES_FLEXARRAY marking
            to all the variant types of the current structure type.

    gcc/testsuite/ChangeLog:

            * gcc.dg/pr120353.c: New test.

    (cherry picked from commit f37c5f1d88c9da17f16cdb33e7c9d43e4bb5f64d)

Reply via email to