4 integer, parameter :: n
=5
5 character(len
=6), dimension(n
,n
) :: a
6 integer, dimension(n
,n
) :: v
7 character(len
=6), dimension(n
) :: r1
, r2
8 character(len
=6), dimension(:,:), allocatable
:: a_alloc
9 integer, dimension(:,:), allocatable
:: v_alloc
10 character(len
=6), parameter :: all_full
= achar(255) // achar(255) // achar(255) // achar(255) // achar(255) // achar(255)
12 character(len
=6),dimension(1) :: ret
13 logical, dimension(n
,n
) :: mask
16 v
= reshape([(i
*i
+200-17*i
,i
=1,n
*n
)],shape(v
))
17 write (unit
=a
,fmt
='(I6.6)') (i
*i
+200-17*i
,i
=1,n
*n
)
20 write (unit
=r2
,fmt
='(I6.6)') minval(v
,dim
=1)
21 if (any (r1
/= r2
)) call abort
23 write (unit
=r1
,fmt
='(I6.6)') minval(v
,dim
=1)
24 if (any (r1
/= r2
)) call abort
28 write (unit
=r2
,fmt
='(I6.6)') minval(v
,dim
=2)
29 if (any (r1
/= r2
)) call abort
31 write (unit
=r1
,fmt
='(I6.6)') minval(v
,dim
=2)
32 if (any (r1
/= r2
)) call abort
34 allocate (a_alloc(0,1), v_alloc(0,1))
36 ret
= minval(a_alloc
,dim
=1)
37 if (ret(1) /= all_full
) call abort
40 r1
= minval(a
, dim
=1, mask
=a
>"000200");
41 if (any(r1
/= all_full
.neqv
. minval(v
,dim
=1, mask
=v
>200) < 1000)) call abort
42 if (any(minval(a
, dim
=1, mask
=a
>"000200") /= all_full
.neqv
. minval(v
,dim
=1, mask
=v
>200) < 1000)) call abort
45 r1
= minval(a
, dim
=2, mask
=a
>"000200");
46 if (any(r1
/= all_full
.neqv
. minval(v
,dim
=2, mask
=v
>200) < 1000)) call abort
47 if (any(minval(a
, dim
=2, mask
=a
>"000200") /= all_full
.neqv
. minval(v
,dim
=2, mask
=v
>200) < 1000)) call abort
55 r1
= minval(a
, dim
=1, mask
=mask
)
56 write(unit
=r2
,fmt
='(I6.6)') minval(v
,dim
=1, mask
=mask
)
57 if (any(r1
/= r2
)) call abort
61 r1
= minval(a
, dim
=1, mask
=smask
)
62 write (unit
=r2
,fmt
='(I6.6)') minval(v
,dim
=1)
63 if (any (r1
/= r2
)) call abort
67 r1
= minval(a
, dim
=1, mask
=smask
)
68 if (any(r1
/= all_full
)) call abort