https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104048
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Arjen Markus from comment #2) > That reduced example is wonderfully compact! (I checked for similar reports > but probably missed bug report 79440, because it was not associated with > "recursive" data types) Because I don't think it is related at all to recursive data types at all take: MODULE h TYPE :: tt END TYPE tt TYPE :: tt1 TYPE(tt), ALLOCATABLE :: left_view END TYPE tt1 CONTAINS FUNCTION ff( arg ) result(res) CLASS(tt), INTENT(IN) :: arg CLASS(tt1), ALLOCATABLE :: res ALLOCATE( res ) res%left_view = arg END FUNCTION ff END MODULE We get the same ICE.