1 ! Test various intrinsics who take a kind argument since Fortran 2003
6 integer, parameter :: k
= kind(0)
7 logical :: l_array(4,5)
15 call check (count(l_array
, kind
=k
), 20)
16 if (any (count(l_array
, 2, kind
=k
) /= 5)) call abort
17 if (any (count(l_array
, kind
=k
, dim
=2) /= 5)) call abort
19 call check (iachar (s
, k
), 117)
20 call check (iachar (s
, kind
=k
), 117)
21 call check (ichar (s
, k
), 117)
22 call check (ichar (s
, kind
=k
), 117)
24 if (achar(107) /= achar(107,1)) call abort
26 call check (index (t
, s
, .true
., k
), 7)
27 call check (index (t
, s
, kind
=k
, back
=.false
.), 5)
29 if (any (lbound (l_array
, kind
=k
) /= 1)) call abort
30 call check (lbound (l_array
, 1), 1)
31 call check (lbound (l_array
, 1, kind
=k
), 1)
33 if (any (ubound (l_array
, kind
=k
) /= (/4, 5/))) call abort
34 call check (ubound (l_array
, 1), 4)
35 call check (ubound (l_array
, 1, kind
=k
), 4)
37 call check (len(t
, k
), 20)
38 call check (len_trim(t
, k
), 10)
40 call check (scan (t
, s
, .true
., k
), 7)
41 call check (scan (t
, s
, kind
=k
, back
=.false
.), 5)
43 call check (size (l_array
, 1, kind
=k
), 4)
44 call check (size (l_array
, kind
=k
), 20)
46 call check (verify (t
, s
, .true
., k
), 20)
47 call check (verify (t
, s
, kind
=k
, back
=.false
.), 1)
52 integer, intent(in
) :: x
, y
53 if (x
/= y
) call abort