https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65381
G. Steinmetz <gs...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gs...@t-online.de --- Comment #4 from G. Steinmetz <gs...@t-online.de> --- Reduced : $ cat z1.f90 module m type t end type contains pure function h(x) result(z) type(t), intent(in) :: x(:) integer :: z z = size(x) end pure function g(x) result(z) class(t), intent(in) :: x(:) integer :: z(h(x)) end pure function f(x) result(z) character(:), allocatable :: z type(t), intent(in) :: x(:) integer, allocatable :: c(:) c = g(x) end end $ gfortran-9-20181118 -c z1.f90 z1.f90:18:0: 18 | c = g(x) | internal compiler error: Segmentation fault 0xb2a03f crash_signal ../../gcc/toplev.c:325 0x6ea62b gfc_conv_component_ref ../../gcc/fortran/trans-expr.c:2426 0x6f1d2b gfc_conv_variable ../../gcc/fortran/trans-expr.c:2794 0x6eea0a gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8047 0x6f0fd0 gfc_conv_expr_lhs(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8077 0x6c77a8 gfc_conv_ss_descriptor ../../gcc/fortran/trans-array.c:2873 0x6ca0e0 gfc_conv_ss_startstride(gfc_loopinfo*) ../../gcc/fortran/trans-array.c:4251 0x6f2813 gfc_conv_subref_array_arg(gfc_se*, gfc_expr*, int, sym_intent, bool) ../../gcc/fortran/trans-expr.c:4493 0x6f6759 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:5615 0x6fa37c gfc_conv_function_expr ../../gcc/fortran/trans-expr.c:6928 0x6ee9ea gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8039 0x6f0a4a gfc_apply_interface_mapping(gfc_interface_mapping*, gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:4451 0x6c6647 gfc_set_loop_bounds_from_array_spec(gfc_interface_mapping*, gfc_se*, gfc_array_spec*) ../../gcc/fortran/trans-array.c:932 0x6f9795 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:6122 0x6fa37c gfc_conv_function_expr ../../gcc/fortran/trans-expr.c:6928 0x6fb0fc gfc_trans_arrayfunc_assign ../../gcc/fortran/trans-expr.c:9462 0x6fea24 gfc_trans_assignment(gfc_expr*, gfc_expr*, bool, bool, bool, bool) ../../gcc/fortran/trans-expr.c:10585 0x6bfe8f trans_code ../../gcc/fortran/trans.c:1822 0x6e7754 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6509 0x6c3c19 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2216