https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78800
Bug ID: 78800
Summary: ICE in compare_parameter, at fortran/interface.c:2246
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: ---
With invalid code, down to at least 4.8 :
(bailed out with official releases 5, 6)
$ cat z1.f90
program p
type t
end type
class(*) :: z
call s(z)
contains
subroutine s(x)
type(t) :: x
end
end
$ gfortran-7-20161211 z1.f90
z1.f90:4:16:
class(*) :: z
1
Error: CLASS variable 'z' at (1) must be dummy, allocatable or pointer
f951: internal compiler error: Segmentation fault
0xc4e79f crash_signal
../../gcc/toplev.c:333
0x69dc54 compare_parameter
../../gcc/fortran/interface.c:2246
0x69e57b compare_actual_formal
../../gcc/fortran/interface.c:2916
0x6a068d gfc_procedure_use(gfc_symbol*, gfc_actual_arglist**, locus*)
../../gcc/fortran/interface.c:3655
0x6fe985 resolve_specific_s0
../../gcc/fortran/resolve.c:3298
0x6fe985 resolve_specific_s
../../gcc/fortran/resolve.c:3318
0x6fe985 resolve_call
../../gcc/fortran/resolve.c:3472
0x6fb8c9 gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.c:11010
0x6fdee2 resolve_codes
../../gcc/fortran/resolve.c:16056
0x6fdfde gfc_resolve(gfc_namespace*)
../../gcc/fortran/resolve.c:16091
0x6e82ba resolve_all_program_units
../../gcc/fortran/parse.c:5947
0x6e82ba gfc_parse_file()
../../gcc/fortran/parse.c:6194
0x72c312 gfc_be_parse_file
../../gcc/fortran/f95-lang.c:202