https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107900
Bug ID: 107900 Summary: Select type with intrinsic type inside associate causes ICE / Segmenation fault Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: kaiserkarl31 at yahoo dot com Target Milestone: --- Using a polymorphic derived type element in a select type statement is not allowed, but placing it in an associate block causes an internal compiler error if one of the "type is" statements includes an intrinsic type. The following program is enough to reproduce it in GFortran 12.2.1: program test class(*), pointer :: ptr associate (c => ptr) select type (c) type is (integer) print *, 'integer' end select end associate end program test Note that the above program wouldn't run, as "ptr" isn't associated with anything, but it shouldn't generate an ICE either.