https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120354
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Qing Zhao <qinz...@gcc.gnu.org>: https://gcc.gnu.org/g:70418e6c0120cfce33ab69628602dfdadbed683a commit r16-1018-g70418e6c0120cfce33ab69628602dfdadbed683a Author: Qing Zhao <qing.z...@oracle.com> Date: Thu May 29 15:59:41 2025 +0000 C: Flex array in union followed by a structure field is not reported [PR120354] There is only one last_field for a structure type, but there might be multiple last_fields for a union type, therefore we should ORed the result of TYPE_INCLUDES_FLEXARRAY for multiple last_fields of a union type. PR c/120354 gcc/c/ChangeLog: * c-decl.cc (finish_struct): Or the results for TYPE_INCLUDES_FLEXARRAY. gcc/testsuite/ChangeLog: * gcc.dg/pr120354.c: New test.