https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118337
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Short reproducer for one of the ICEs: /usr/src/gcc-15/obj/gcc/f951 -quiet libxc_master.f90 /usr/src/gcc-15/obj/gcc/f951 -quiet fu.f90 This compiles fine /usr/src/gcc-14/obj/gcc/f951 -quiet libxc_master.f90 /usr/src/gcc-15/obj/gcc/f951 -quiet fu.f90 fu.f90:10:18: 10 | end subroutine foo | 1 internal compiler error: tree check: expected record_type or union_type or qual_union_type, have pointer_type in gfc_trans_structure_assign, at fortran/trans-expr.cc:9906 0x2d322df internal_error(char const*, ...) ../../gcc/diagnostic-global-context.cc:517 0x12fd1d3 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/tree.cc:9044 0x5b6939 tree_check3(tree_node*, char const*, int, char const*, tree_code, tree_code, tree_code) ../../gcc/tree.h:3705 0x602a93 gfc_trans_structure_assign(tree_node*, gfc_expr*, bool, bool) ../../gcc/fortran/trans-expr.cc:9906 0x6033c3 gfc_conv_structure(gfc_se*, gfc_expr*, int) ../../gcc/fortran/trans-expr.cc:10063 0x603bb3 gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.cc:10231 0x602815 gfc_trans_subcomponent_assign ../../gcc/fortran/trans-expr.cc:9864 0x60303e gfc_trans_structure_assign(tree_node*, gfc_expr*, bool, bool) ../../gcc/fortran/trans-expr.cc:9997 0x6033c3 gfc_conv_structure(gfc_se*, gfc_expr*, int) ../../gcc/fortran/trans-expr.cc:10063 0x603bb3 gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.cc:10231 0x60cad7 gfc_trans_assignment_1 ../../gcc/fortran/trans-expr.cc:12806 0x60dfc8 gfc_trans_assignment(gfc_expr*, gfc_expr*, bool, bool, bool, bool) ../../gcc/fortran/trans-expr.cc:13213 0x5ce01c gfc_init_default_dt(gfc_symbol*, stmtblock_t*, bool) ../../gcc/fortran/trans-decl.cc:4487 0x5d0cdc gfc_trans_deferred_vars(gfc_symbol*, gfc_wrapped_block*) ../../gcc/fortran/trans-decl.cc:5266 0x5dc20b gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.cc:8148 0x58e092 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.cc:2764 0x5058b8 translate_all_program_units ../../gcc/fortran/parse.cc:7216 0x5062b7 gfc_parse_file() ../../gcc/fortran/parse.cc:7546 0x573b33 gfc_be_parse_file ../../gcc/fortran/f95-lang.cc:241 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.