https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110421
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Jerry DeLisle <[email protected]>: https://gcc.gnu.org/g:24862caf8042151db3288e271630c22edb74ad99 commit r14-12944-g24862caf8042151db3288e271630c22edb74ad99 Author: Jerry DeLisle <[email protected]> Date: Sun Jul 12 15:51:13 2026 -0700 fortran: [PR110421] Fix ICE sizing CLASS component from derived value Allocating a CLASS component of a structure constructor from a non-polymorphic derived-type value ICEd, because alloc_scalar_allocatable_subcomponent passed the type's own symbol to gfc_get_symbol_decl to get the size. The patch uses gfc_typenode_for_spec for derived types too, as it already does for every other type. PR fortran/110421 gcc/fortran/ChangeLog: * trans-expr.cc (alloc_scalar_allocatable_subcomponent): Use gfc_typenode_for_spec for BT_DERIVED values too. gcc/testsuite/ChangeLog: * gfortran.dg/pr110421.f90: New test. (cherry picked from commit 51ade34151dff8e444bfe3623373f42c1a29b5fa)
