https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125760
--- 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:18b2b8c0b2745df0ad297753fa3fc3a8083543b8 commit r17-5067-g18b2b8c0b2745df0ad297753fa3fc3a8083543b8 Author: Jerry DeLisle <[email protected]> Date: Thu Jun 11 17:35:00 2026 -0700 fortran: [PR125760] Fix ICE in SELECT TYPE with array-section selector of a class array In trans_associate_var, get the class container for the _len copy from the selector expression when target_expr is not a _data COMPONENT_REF. Assisted-by: Claude Opus 5.5 PR fortran/125760 gcc/fortran/ChangeLog: * trans-stmt.cc (trans_associate_var): Use gfc_get_class_from_gfc_expr when target_expr is not a COMPONENT_REF. gcc/testsuite/ChangeLog: * gfortran.dg/select_type_52.f90: New test.
