5 module assumed_rank_module
9 public
:: rank_of_pointer_level1
11 subroutine rank_of_pointer_level1(ap
,aa
)
12 real, dimension(..), intent(in
), pointer :: ap
13 real, dimension(..), intent(in
), allocatable
:: aa
14 if (rank(ap
) /= 3) stop 1
15 if (rank(aa
) /= 3) stop 2
16 call rank_of_pointer_level2(ap
, aa
)
17 end subroutine rank_of_pointer_level1
19 subroutine rank_of_pointer_level2(ap
,aa
)
20 real, dimension(..), intent(in
), pointer :: ap
21 real, dimension(..), intent(in
), allocatable
:: aa
23 if (rank(ap
) /= 3) stop 3
24 if (rank(aa
) /= 3) stop 4
25 end subroutine rank_of_pointer_level2
26 end module assumed_rank_module
29 use :: assumed_rank_module
, only
: rank_of_pointer_level1
31 real, dimension(:,:,:), pointer :: ap
32 real, dimension(:,:,:), allocatable
:: aa
35 call rank_of_pointer_level1(ap
, aa
)
36 end program assumed_rank