https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128042
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Harald Anlauf <[email protected]>: https://gcc.gnu.org/g:3c558ff167064221480f7ca09c5ce76e63e656a7 commit r15-11730-g3c558ff167064221480f7ca09c5ce76e63e656a7 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. (cherry picked from commit 9489436ad494b0348135e4cfaac8b583f4da8a8f)
