https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104556
Bug ID: 104556 Summary: ICE in gfc_conv_class_to_class, at fortran/trans-expr.cc:1267 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Starts with r9 (r12 changed between 20210502 and 20210509) : (one leap away from pr103389) $ cat z1.f90 subroutine sub(y) class(*) :: y(*) call s((y)) contains subroutine s(x) class(*) :: x(..) end end $ cat z2.f90 program p contains subroutine sub(y) class(*) :: y(*) call s((y)) end subroutine s(x) class(*) :: x(..) end end $ gfortran-12-20220213 -c z1.f90 z1.f90:3:14: 3 | call s((y)) | 1 internal compiler error: Segmentation fault 0xcc8a9f crash_signal ../../gcc/toplev.cc:322 0x7d9c86 gfc_conv_class_to_class(gfc_se*, gfc_expr*, gfc_typespec, bool, bool, bool, bool) ../../gcc/fortran/trans-expr.cc:1267 0x7e3532 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*, gfc_expr*, vec<tree_node*, va_gc, vl_embed>*) ../../gcc/fortran/trans-expr.cc:6729 0x81f690 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool) ../../gcc/fortran/trans-stmt.cc:422 0x7a7928 trans_code ../../gcc/fortran/trans.cc:1984 0x7d093e gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.cc:7654 0x75367e translate_all_program_units ../../gcc/fortran/parse.cc:6651 0x75367e gfc_parse_file() ../../gcc/fortran/parse.cc:6938 0x7a066f gfc_be_parse_file ../../gcc/fortran/f95-lang.cc:216