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

--- Comment #3 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:1da1aa07b7b7b529770015c279e9faad3292c696

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

    fortran: [PR125721] Fix ICE for a class pointer component in a structure
constructor

    In a structure constructor, associate a scalar or array CLASS pointer
    component with a non-class target: set _data, _vptr and, for an
    unlimited polymorphic component, _len.

    Assisted-by: Claude Opus 5.5

            PR fortran/125721

    gcc/fortran/ChangeLog:

            * trans-expr.cc (gfc_trans_subcomponent_assign): Handle a CLASS
            pointer component with a non-class target.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/structure_constructor_20.f90: New test.
            * gfortran.dg/structure_constructor_21.f90: New test.
  • [Bug fortran/125721] ICE in gfc... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to