https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77885
Bug ID: 77885 Summary: ICE in gfc_add_class_array_ref, at fortran/class.c:259 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- With invalid code, down to at least 4.8 : $ cat z1.f90 program p type t end type class(t), pointer :: x => null() call s(x) contains subroutine s(x) class(t) :: x[*] end end $ /home/gst/gcc/gcc-7-20161002-oyd/bin/gfortran -fcoarray=single z1.f90 z1.f90:5:0: call s(x) internal compiler error: Segmentation fault 0xc29b8f crash_signal ../../gcc/toplev.c:337 0x670cfb gfc_add_class_array_ref(gfc_expr*) ../../gcc/fortran/class.c:259 0x761362 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:5087 0x7a4dc4 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool) ../../gcc/fortran/trans-stmt.c:407 0x7243fa trans_code ../../gcc/fortran/trans.c:1787 0x7538f8 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6257 0x6de270 translate_all_program_units ../../gcc/fortran/parse.c:5940 0x6de270 gfc_parse_file() ../../gcc/fortran/parse.c:6146 0x720e82 gfc_be_parse_file ../../gcc/fortran/f95-lang.c:198