https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102520
Bug ID: 102520
Summary: [10/11/12 Regression] ICE in expand_constructor, at
fortran/array.c:1802
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Changed between 20200223 (error) and 20200308 (ICE) :
$ cat z1.f90
program p
type t
end type
type(t), parameter :: a(4) = shape(1)
type(t), parameter :: b(2,2) = reshape(a, [2,2])
type(t), parameter :: c(2,2) = transpose(b)
end
$ gfortran-12-20210926 -c z1.f90
f951: internal compiler error: Segmentation fault
0xd400cf crash_signal
../../gcc/toplev.c:328
0x760928 expand_constructor
../../gcc/fortran/array.c:1802
0x76200a gfc_get_array_element
../../gcc/fortran/array.c:1852
0x76200a gfc_expand_constructor(gfc_expr*, bool)
../../gcc/fortran/array.c:1875
0x798804 gfc_check_init_expr(gfc_expr*)
../../gcc/fortran/expr.c:3101
0x798c67 gfc_reduce_init_expr(gfc_expr*)
../../gcc/fortran/expr.c:3127
0x79beb0 gfc_match_init_expr(gfc_expr**)
../../gcc/fortran/expr.c:3173
0x7866a4 variable_decl
../../gcc/fortran/decl.c:3012
0x7866a4 gfc_match_data_decl()
../../gcc/fortran/decl.c:6321
0x7ee813 match_word
../../gcc/fortran/parse.c:65
0x7ee813 decode_statement
../../gcc/fortran/parse.c:376
0x7f025a next_free
../../gcc/fortran/parse.c:1384
0x7f025a next_statement
../../gcc/fortran/parse.c:1616
0x7f197b parse_spec
../../gcc/fortran/parse.c:4151
0x7f474c parse_progunit
../../gcc/fortran/parse.c:6117
0x7f5ed1 gfc_parse_file()
../../gcc/fortran/parse.c:6658
0x842daf gfc_be_parse_file
../../gcc/fortran/f95-lang.c:216