1! { dg-do compile } 2! 3! PR fortran/47455 4! 5module class_t 6 type :: tx 7 integer, dimension(:), allocatable :: i 8 end type tx 9 type :: t 10 type(tx), pointer :: x 11 contains 12 procedure :: calc 13 procedure :: find_x 14 end type t 15contains 16 subroutine calc(this) 17 class(t), target :: this 18 this%x = this%find_x() 19 end subroutine calc 20 function find_x(this) 21 class(t), intent(in) :: this 22 type(tx), pointer :: find_x 23 find_x => null() 24 end function find_x 25end module class_t 26