https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95980
Bug ID: 95980
Summary: ICE in get_unique_type_string, at fortran/class.c:485
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.
With a missing attribute allocatable or pointer :
$ cat z1.f90
program p
type t
integer :: a
end type
class(t) :: x
select type (y => x)
end select
end
$ gfortran-11-20200628 -c z1.f90
f951: internal compiler error: Segmentation fault
0xbd215f crash_signal
../../gcc/toplev.c:328
0x63535a get_unique_type_string
../../gcc/fortran/class.c:485
0x635de1 get_unique_hashed_string
../../gcc/fortran/class.c:522
0x6392ce gfc_build_class_symbol(gfc_typespec*, symbol_attribute*,
gfc_array_spec**)
../../gcc/fortran/class.c:666
0x68f543 gfc_match_select_type()
../../gcc/fortran/match.c:6422
0x6ae2b4 match_word
../../gcc/fortran/parse.c:65
0x6ae2b4 decode_statement
../../gcc/fortran/parse.c:428
0x6afaea next_free
../../gcc/fortran/parse.c:1280
0x6afaea next_statement
../../gcc/fortran/parse.c:1512
0x6b113b parse_spec
../../gcc/fortran/parse.c:3923
0x6b3f0c parse_progunit
../../gcc/fortran/parse.c:5852
0x6b55e9 gfc_parse_file()
../../gcc/fortran/parse.c:6393
0x7016ff gfc_be_parse_file
../../gcc/fortran/f95-lang.c:212