https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87980
G. Steinmetz <gs...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gs...@t-online.de --- Comment #5 from G. Steinmetz <gs...@t-online.de> --- Some possible simplifications (z1/z2) : $ cat z1.f90 module m type t contains procedure :: f => g end type contains subroutine g (z, x) class(t) :: z class(t), optional :: x end subroutine s (z, x) class(t) :: z class(t), optional :: x(:) if ( present(x) ) call z%f(x(1)) end end $ cat z2.f90 module m type t contains procedure :: f => g end type contains subroutine g (z, x) class(t) :: z class(t), optional :: x end subroutine s (z, x) class(t) :: z class(t), optional :: x(1) if ( present(x) ) call z%f(x(1)) end end $ gfortran-10-20190915 -c z1.f90 z1.f90:14:0: 14 | if ( present(x) ) call z%f(x(1)) | internal compiler error: in gfc_conv_descriptor_data_get, at fortran/trans-array.c:145 0x6ca048 gfc_conv_descriptor_data_get(tree_node*) ../../gcc/fortran/trans-array.c:145 0x6f6669 gfc_conv_class_to_class(gfc_se*, gfc_expr*, gfc_typespec, bool, bool, bool, bool) ../../gcc/fortran/trans-expr.c:1163 0x6ffe24 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*, gfc_expr*, vec<tree_node*, va_gc, vl_embed>*) ../../gcc/fortran/trans-expr.c:5861 0x732988 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool) ../../gcc/fortran/trans-stmt.c:406 0x6c5341 trans_code ../../gcc/fortran/trans.c:1920 0x72eee3 gfc_trans_if_1 ../../gcc/fortran/trans-stmt.c:1448 0x7367fa gfc_trans_if(gfc_code*) ../../gcc/fortran/trans-stmt.c:1479 0x6c5097 trans_code ../../gcc/fortran/trans.c:1940 0x6edd14 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6781 0x6c8d89 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2250 0x6776c1 translate_all_program_units ../../gcc/fortran/parse.c:6241 0x6776c1 gfc_parse_file() ../../gcc/fortran/parse.c:6493 0x6c1a0f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:204