program main
implicit none
type Level
real(kind=8),allocatable::b(:,:)
end type
real(kind=8),pointer::c(:,:)
type(Level),target::a
allocate(a%b(5,5))
a%b = 1
c => a%b
c(1,1)=2
print*,a%b(1,1)
stop
end
注意:type(Level),target::a中一定要加target,才可以真正的指向结构体。