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

--- Comment #19 from GCC 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:d637e6d069ade775a4b61f51fff61fe4cce01c36

commit r15-6408-gd637e6d069ade775a4b61f51fff61fe4cce01c36
Author: Harald Anlauf <anl...@gmx.de>
Date:   Sat Dec 14 20:26:47 2024 +0100

    Fortran: fix passing of NULL() to assumed-rank, derived type dummy
[PR104819]

            PR fortran/104819

    gcc/fortran/ChangeLog:

            * interface.cc (compare_parameter): For the rank check, NULL()
            inherits the rank of a provided MOLD argument.
            (gfc_compare_actual_formal): Adjust check of NULL() actual argument
            against formal to accept F2008 enhancements (allocatable dummy).
            NULL() with MOLD argument retains a pointer/allocatable attribute.
            * trans-expr.cc (conv_null_actual): Implement passing NULL() to
            derived-type dummy with pointer/allocatable attribute, and ensure
            that the actual rank is passed to an assumed-rank dummy.
            (gfc_conv_procedure_call): Use it.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/null_actual_7.f90: New test.

Reply via email to