https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90498
Bug ID: 90498
Summary: [8,9 Regression] ICE with select type/associate and
derived type argument containing class(*)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: vladimir.fuka at gmail dot com
Target Milestone: ---
subroutine s(a)
use iso_fortran_env
type field_names_a
class(*), pointer :: var(:) =>null()
end type
type(field_names_a) :: a(:)
select type (var => a(1)%var)
class default
stop
end select
! associate (var => a(i)%var)
! end associate
end
ICEs with 8.3 and 9.1. The associate also ICEs with 7.4.
> gfortran-9 ice2.f90
ice2.f90:1:0:
1 | subroutine s(a)
|
internal compiler error: in fold_convert_loc, at fold-const.c:2429
associate version:
> gfortran-9 ice2.f90
ice2.f90:14:0:
14 | associate (var => a(i)%var)
|
internal compiler error: in fold_convert_loc, at fold-const.c:2429