[Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 29 19:50:25 GMT 2023


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
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:74ef4221b5ebb1122349ad48422ddc40e98c267d

commit r13-7502-g74ef4221b5ebb1122349ad48422ddc40e98c267d
Author: Harald Anlauf <anlauf@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 <mikael@gcc.gnu.org>
    (cherry picked from commit c1691509e5a8875f36c068a5ea101bf13f140948)


More information about the Gcc-bugs mailing list