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

--- Comment #6 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:0d1e62b83561baa185bf080515750a89dd3ac410

commit r15-7070-g0d1e62b83561baa185bf080515750a89dd3ac410
Author: Harald Anlauf <anl...@gmx.de>
Date:   Sun Jan 19 21:06:56 2025 +0100

    Fortran: do not copy back for parameter actual arguments [PR81978]

    When an array is packed for passing as an actual argument, and the array
    has the PARAMETER attribute (i.e., it is a named constant that can reside
    in read-only memory), do not copy back (unpack) from the temporary.

            PR fortran/81978

    gcc/fortran/ChangeLog:

            * trans-array.cc (gfc_conv_array_parameter): Do not copy back data
            if actual array parameter has the PARAMETER attribute.
            * trans-expr.cc (gfc_conv_subref_array_arg): Likewise.

    gcc/testsuite/ChangeLog:

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

Reply via email to