https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109500

--- Comment #23 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:eb385a4801c45a1c0574810b45fce9e712d34566

commit r14-167-geb385a4801c45a1c0574810b45fce9e712d34566
Author: Harald Anlauf <anl...@gmx.de>
Date:   Thu Apr 20 21:47:34 2023 +0200

    Fortran: function results never have the ALLOCATABLE attribute [PR109500]

    Fortran 2018 8.5.3 (ALLOCATABLE attribute) explains in Note 1 that the
    result of referencing a function whose result variable has the ALLOCATABLE
    attribute is a value that does not itself have the ALLOCATABLE attribute.

    gcc/fortran/ChangeLog:

            PR fortran/109500
            * interface.cc (gfc_compare_actual_formal): Reject allocatable
            functions being used as actual argument for allocable dummy.

    gcc/testsuite/ChangeLog:

            PR fortran/109500
            * gfortran.dg/allocatable_function_11.f90: New test.

    Co-authored-by: Steven G. Kargl <ka...@gcc.gnu.org>

Reply via email to