https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78892
G. Steinmetz <gs...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gs...@t-online.de --- Comment #2 from G. Steinmetz <gs...@t-online.de> --- Related to pr66681, with option -finit-local-zero or -finit-real : $ cat z1.f90 program p real :: a[*] integer :: i if ( this_image() == 1 ) then do i = 1, num_images() a[i] = i end do end if end $ cat z2.f90 program p real :: a[*] a[this_image()] = this_image() end $ cat z3.f90 program p real :: a[*] a = this_image() end $ gfortran-9-20181125 -c z1.f90 -fcoarray=lib $ $ gfortran-9-20181125 -c z1.f90 -fcoarray=lib -finit-local-zero z1.f90:2:0: 2 | real :: a[*] | internal compiler error: in fold_convert_loc, at fold-const.c:2426 0x8ab5f7 fold_convert_loc(unsigned int, tree_node*, tree_node*) ../../gcc/fold-const.c:2425 0x6ee4b5 gfc_trans_scalar_assign(gfc_se*, gfc_se*, gfc_typespec, bool, bool, bool) ../../gcc/fortran/trans-expr.c:9063 0x6fe7ed gfc_trans_assignment_1 ../../gcc/fortran/trans-expr.c:10449 0x6c1135 trans_code ../../gcc/fortran/trans.c:1837 0x6e88d4 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6509 0x675026 translate_all_program_units ../../gcc/fortran/parse.c:6125 0x675026 gfc_parse_file() ../../gcc/fortran/parse.c:6328 0x6bdaff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:204