https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56423
G. Steinmetz changed:
What|Removed |Added
CC||gs...@t-online.de
--- Comment #2 from G. Steinmetz ---
Update, slightly simplified :
$ cat z1.f90
program p
integer, target :: x(3) = [7, 8, 9]
type t
integer, pointer :: a(:)
end type
type(t) :: z
z = t(x([2]))
print *, z%a
end
$ gfortran-9-20181104 -c z1.f90
z1.f90:7:0:
7 |z = t(x([2]))
|
internal compiler error: in gfc_conv_expr_descriptor, at
fortran/trans-array.c:7285
0x6d14c3 gfc_conv_expr_descriptor(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-array.c:7285
0x6f2a9b gfc_trans_subcomponent_assign
../../gcc/fortran/trans-expr.c:7485
0x6f375a gfc_trans_structure_assign(tree_node*, gfc_expr*, bool, bool)
../../gcc/fortran/trans-expr.c:7824
0x6edf0f gfc_conv_structure(gfc_se*, gfc_expr*, int)
../../gcc/fortran/trans-expr.c:7891
0x6ee14c gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:8059
0x6fc779 gfc_trans_assignment_1
../../gcc/fortran/trans-expr.c:10248
0x6bf54f trans_code
../../gcc/fortran/trans.c:1822
0x6e6e14 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6509
0x6740a6 translate_all_program_units
../../gcc/fortran/parse.c:6125
0x6740a6 gfc_parse_file()
../../gcc/fortran/parse.c:6328
0x6bc03f gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204
---
And nearby :
$ cat z2.f90
program p
integer, target :: x(3) = [7, 8, 9]
type t
integer, pointer :: a(:)
end type
type(t) :: z
z = t(x(2))
print *, z%a
end
$ gfortran-9-20181104 -c z2.f90
z2.f90:7:0:
7 |z = t(x(2))
|
internal compiler error: in gfc_conv_expr_descriptor, at
fortran/trans-array.c:7090
0x6d14eb gfc_conv_expr_descriptor(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-array.c:7090
0x6f2a9b gfc_trans_subcomponent_assign
../../gcc/fortran/trans-expr.c:7485
0x6f375a gfc_trans_structure_assign(tree_node*, gfc_expr*, bool, bool)
../../gcc/fortran/trans-expr.c:7824
0x6edf0f gfc_conv_structure(gfc_se*, gfc_expr*, int)
../../gcc/fortran/trans-expr.c:7891
0x6ee14c gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:8059
0x6fc779 gfc_trans_assignment_1
../../gcc/fortran/trans-expr.c:10248
0x6bf54f trans_code
../../gcc/fortran/trans.c:1822
0x6e6e14 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6509
0x6740a6 translate_all_program_units
../../gcc/fortran/parse.c:6125
0x6740a6 gfc_parse_file()
../../gcc/fortran/parse.c:6328
0x6bc03f gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204