https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104352
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:7bafe652dba9167b65e7b5ef24e77eceb49709ba commit r14-950-g7bafe652dba9167b65e7b5ef24e77eceb49709ba Author: Harald Anlauf <anl...@gmx.de> Date: Wed May 17 20:39:18 2023 +0200 Fortran: set shape of initializers of zero-sized arrays [PR95374,PR104352] gcc/fortran/ChangeLog: PR fortran/95374 PR fortran/104352 * decl.cc (add_init_expr_to_sym): Set shape of initializer also for zero-sized arrays, so that bounds violations can be detected later. gcc/testsuite/ChangeLog: PR fortran/95374 PR fortran/104352 * gfortran.dg/zero_sized_13.f90: New test.