program ptest
implicit none


integer, parameter :: n = 4

TYPE row
   REAL, POINTER , DIMENSION(:) :: r
END TYPE row

TYPE(row), DIMENSION(n) :: s, t

integer i, j

DO I = 1,n
   ALLOCATE(t(i)%r(1:i))
   do j = 1,i
     t(i)%r(j) = i*j
   enddo
ENDDO
s=t

do i = 1,n
   print*,'row',i,'s',s(i)%r
enddo

end program ptest
