https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72699
Bug ID: 72699
Summary: ICE in gfc_check_dependency, at
fortran/dependency.c:1257
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
ICE with 7, 6 (releases bailout), not with 5.4, 4.9 and 4.8.
Invalid code, with "implicit none" :
$ cat z1.f90
function f() result(z)
implicit none
character(:), allocatable :: z
h = z(1)
z(1) = h
end
$ gfortran-7-20160724 z1.f90
z1.f90:4:4:
h = z(1)
1
Error: Symbol 'h' at (1) has no IMPLICIT type
z1.f90:4:7:
h = z(1)
1
Error: The allocatable object 'z' at (1) must have an explicit function
interface or be declared as array
z1.f90:5:3:
z(1) = h
1
Error: The allocatable object 'z' at (1) must have an explicit function
interface or be declared as array
f951: internal compiler error: in gfc_check_dependency, at
fortran/dependency.c:1257
0x71204b gfc_check_dependency(gfc_expr*, gfc_expr*, bool)
../../gcc/fortran/dependency.c:1257
0x7ad777 realloc_string_callback
../../gcc/fortran/frontend-passes.c:175
0x7b07c9 gfc_code_walker(gfc_code**, int (*)(gfc_code**, int*, void*), int
(*)(gfc_expr**, int*, void*), void*)
../../gcc/fortran/frontend-passes.c:3381
0x7b1912 realloc_strings
../../gcc/fortran/frontend-passes.c:1015
0x6ec14a gfc_resolve(gfc_namespace*)
../../gcc/fortran/resolve.c:15707
0x6d744a resolve_all_program_units
../../gcc/fortran/parse.c:5855
0x6d744a gfc_parse_file()
../../gcc/fortran/parse.c:6107
0x719b82 gfc_be_parse_file
../../gcc/fortran/f95-lang.c:198