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

--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <[email protected]>:

https://gcc.gnu.org/g:9489436ad494b0348135e4cfaac8b583f4da8a8f

commit r17-5752-g9489436ad494b0348135e4cfaac8b583f4da8a8f
Author: Harald Anlauf <[email protected]>
Date:   Thu Oct 29 22:03:32 2026 +0100

    fortran: Fix simplification of TRANSFER of derived types [PR128042]

    The simplification of TRANSFER of a derived type containing an array
    component that was initialized by a scalar constant was mishandled: only
    the first array element was set in encode_derived, although all elements
    of that array should be set to the same value.

            PR fortran/128042

    gcc/fortran/ChangeLog:

            * target-memory.cc (encode_derived): Handle the case where an array
            component of a derived type is initialized by a scalar.

    gcc/testsuite/ChangeLog:

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

Reply via email to