https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86551
Bug ID: 86551 Summary: [ICE] bare class and select type Product: gcc Version: 8.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: daanvanvugt at gmail dot com Target Milestone: --- The following program produces an internal compiler error for me. module a type, abstract :: t1 end type type, extends(t1) :: t2 end type contains subroutine b implicit none class(t1) :: c2 select type (d => c2) end select type end subroutine b end module a Removing the select type statement gives the expected error: a.f90:9:19: class(t1) :: c2 1 Error: CLASS variable ‘c2’ at (1) must be dummy, allocatable or pointer Adding allocatable or pointer attributes fixes the ICE.