https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277
--- Comment #33 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:c1691509e5a8875f36c068a5ea101bf13f140948 commit r14-1795-gc1691509e5a8875f36c068a5ea101bf13f140948 Author: Harald Anlauf <anl...@gmx.de> Date: Mon Jun 12 23:08:48 2023 +0200 Fortran: fix passing of zero-sized array arguments to procedures [PR86277] gcc/fortran/ChangeLog: PR fortran/86277 * trans-array.cc (gfc_trans_allocate_array_storage): When passing a zero-sized array with fixed (= non-dynamic) size, allocate temporary by the caller, not by the callee. gcc/testsuite/ChangeLog: PR fortran/86277 * gfortran.dg/zero_sized_14.f90: New test. * gfortran.dg/zero_sized_15.f90: New test. Co-authored-by: Mikael Morin <mik...@gcc.gnu.org>