https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100275
G. Steinmetz <gs...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code --- Comment #1 from G. Steinmetz <gs...@t-online.de> --- Additional variants : $ cat z2.f90 program p type t integer :: a end type type(t) :: x data x /t(null())/ end $ cat z3.f90 program p type t integer :: a(1) end type type(t) :: z data z /t(f())/ end $ gfortran-11-20210425 -c z2.f90 # detected z2.f90:6:13: 6 | data x /t(null())/ | 1 Error: non-constant initialization expression at (1) $ gfortran-11-20210425 -c z3.f90 z3.f90:1:9: 1 | program p | 1 internal compiler error: in gfc_conv_array_initializer, at fortran/trans-array.c:6230 0x785ae2 gfc_conv_array_initializer(tree_node*, gfc_expr*) ../../gcc/fortran/trans-array.c:6230 0x7c6d20 gfc_conv_initializer(gfc_expr*, gfc_typespec*, tree_node*, bool, bool, bool) ../../gcc/fortran/trans-expr.c:7948 0x7c74b3 gfc_conv_structure(gfc_se*, gfc_expr*, int) ../../gcc/fortran/trans-expr.c:8863 0x7c6e79 gfc_conv_initializer(gfc_expr*, gfc_typespec*, tree_node*, bool, bool, bool) ../../gcc/fortran/trans-expr.c:7983 0x7a756a gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1918 0x7ab08f generate_local_decl ../../gcc/fortran/trans-decl.c:5955 0x75b472 do_traverse_symtree ../../gcc/fortran/symbol.c:4170 0x7ac5cc generate_local_vars ../../gcc/fortran/trans-decl.c:6161 0x7ac5cc gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6820 0x723fa6 translate_all_program_units ../../gcc/fortran/parse.c:6355 0x723fa6 gfc_parse_file() ../../gcc/fortran/parse.c:6624 0x770e5f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212