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

--- Comment #16 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:f70c1d517e09c4dde421774a8cec591ca3c479a0

commit r15-5295-gf70c1d517e09c4dde421774a8cec591ca3c479a0
Author: Harald Anlauf <anl...@gmx.de>
Date:   Thu Nov 14 21:38:04 2024 +0100

    Fortran: fix passing of NULL() actual argument to character dummy
[PR104819]

    Ensure that character length is set and passed by the call to a procedure
    when its dummy argument is NULL() with MOLD argument present, or set length
    to either 0 or the callee's expected character length.  For assumed-rank
    dummies, use the rank of the MOLD argument.  Generate temporaries for
    passed arguments when needed.

            PR fortran/104819

    gcc/fortran/ChangeLog:

            * trans-expr.cc (conv_null_actual): Helper function to handle
            passing of NULL() to non-optional dummy arguments of non-bind(c)
            procedures.
            (gfc_conv_procedure_call): Use it for character dummies.

    gcc/testsuite/ChangeLog:

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

Reply via email to