3 ! Passing array valued results to procedures
5 ! Test case contributed by rakuen_himawari@yahoo.co.jp
22 integer,ALLOCATABLE
:: foo2(:)
34 integer,ALLOCATABLE
:: foo3(:)
37 call bar2(n
, foo3(2:(n
-1))) ! Check that sections are OK
40 subroutine bar1 (n
, array
) ! Checks assumed size formal arg.
49 subroutine bar2(n
, array
) ! Checks assumed shape formal arg.
53 do i
= 1, size (array
, 1)
63 if(any (foo1(n
) /= [ 1,2,3 ])) call abort()
64 if(any (foo2(n
) /= [ 1,2,3 ])) call abort()
66 if(any (foo1(n
) /= [ 1,2,3 ])) call abort()
67 if(any (foo2(n
) /= [ 1,2,3 ])) call abort()
69 if(any (foo3(n
) /= [ 0,1,2,3,0 ])) call abort()