https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277
--- Comment #35 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:74ef4221b5ebb1122349ad48422ddc40e98c267d commit r13-7502-g74ef4221b5ebb1122349ad48422ddc40e98c267d 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> (cherry picked from commit c1691509e5a8875f36c068a5ea101bf13f140948)