blob: 9873db7b0bd5884db2d261f79c7ed01bdb0a3623 [file] [log] [blame]
! { dg-do compile }
! PR fortran/51754
! This program was leading to an ICE related to class arrays
! Contributed by Andrew Benson <>
module test
type :: componentB
end type componentB
type :: treeNode
class(componentB), allocatable, dimension(:) :: componentB
end type treeNode
function BGet(self)
implicit none
class(componentB), pointer :: BGet
class(treeNode), target, intent(in) :: self
select type (self)
class is (treeNode)
BGet => self%componentB(1)
end select
end function BGet
end module test