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

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

https://gcc.gnu.org/g:78d6e3832905ce5e028d8acef21eff08e8b50819

commit r17-5064-g78d6e3832905ce5e028d8acef21eff08e8b50819
Author: Jerry DeLisle <[email protected]>
Date:   Wed Jun 10 08:36:59 2026 -0700

    fortran: [PR125720] ICE assigning an allocatable character to an
allocatable component

    In a structure constructor, copy a value into an explicit-length
    allocatable character component with gfc_trans_string_copy instead of
    a scalar fold_convert.

    Assisted-by: Claude Opus 5.5

            PR fortran/125720

    gcc/fortran/ChangeLog:

            * trans-expr.cc (gfc_trans_subcomponent_assign): Use
            gfc_trans_string_copy for an explicit-length allocatable
            character component.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/structure_constructor_19.f90: New test.
  • [Bug fortran/125720] Wrong code... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to