https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95339
Bug ID: 95339
Summary: ICE in
alloc_scalar_allocatable_for_subcomponent_assignment,
at fortran/trans-expr.c:8002
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Affects versions down to at least r5 :
$ cat z1.f90
program p
type t
character(:), allocatable :: a
end type
type(t) :: x[*]
data x /t(1)/
end
$ gfortran-11-20200524 -c z1.f90 -fcoarray=single # accepted
$
$ gfortran-11-20200524 -c z1.f90 -fcoarray=lib
z1.f90:1:0:
1 | program p
|
internal compiler error: in
alloc_scalar_allocatable_for_subcomponent_assignment, at
fortran/trans-expr.c:8002
0x73618f alloc_scalar_allocatable_for_subcomponent_assignment
../../gcc/fortran/trans-expr.c:8002
0x73618f gfc_trans_subcomponent_assign
../../gcc/fortran/trans-expr.c:8190
0x7362bb gfc_trans_structure_assign(tree_node*, gfc_expr*, bool, bool)
../../gcc/fortran/trans-expr.c:8467
0x72f860 gfc_conv_structure(gfc_se*, gfc_expr*, int)
../../gcc/fortran/trans-expr.c:8534
0x72fa9c gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:8702
0x73f1aa gfc_trans_assignment_1
../../gcc/fortran/trans-expr.c:10884
0x71cf48 generate_coarray_sym_init
../../gcc/fortran/trans-decl.c:5688
0x6e6e32 do_traverse_symtree
../../gcc/fortran/symbol.c:4150
0x71c385 generate_coarray_init
../../gcc/fortran/trans-decl.c:5738
0x728aa4 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6773
0x6affe6 translate_all_program_units
../../gcc/fortran/parse.c:6306
0x6affe6 gfc_parse_file()
../../gcc/fortran/parse.c:6545
0x6fb9af gfc_be_parse_file
../../gcc/fortran/f95-lang.c:210