5 ! This test case adds check for the new Fortran 2008 array parameters
6 ! in ISO_FORTRAN_ENV: integer_kinds, logical_kinds, character_kinds,
9 ! The test thus also checks that the values of the parameter are used
10 ! and no copy is made. (Cf. PR 44856.)
13 use iso_fortran_env
, only
: integer_kinds
, character_kinds
18 print *, integer_kinds
19 print *, integer_kinds(1)
20 print *, (integer_kinds
)
21 print *, (integer_kinds
+ 1)
22 print *, integer_kinds(1:2)
23 print *, integer_kinds(i
)
25 aaaa
= character_kinds
26 aaaa(1:2) = character_kinds(1:2)
27 aaaa(i
) = character_kinds(i
)
28 aaaa
= character_kinds
+ 0
29 aaaa(1:2) = character_kinds(1:2) + 0
30 aaaa(i
) = character_kinds(i
) + 0
34 use iso_fortran_env
, only
: ik
=> integer_kinds
, ik2
=> integer_kinds
37 if (any (ik
/= ik2
)) call never_call_me()
44 ! Should be 1, 2, 4, 8 and possibly 16
45 if (size (integer_kinds
) < 4) call never_call_me()
46 if (any (integer_kinds(1:4) /= [1,2,4,8])) call never_call_me()
47 if (any (integer_kinds
/= logical_kinds
)) call never_call_me()
49 if (size (character_kinds
) /= 2) call never_call_me()
50 if (any (character_kinds
/= [1,4])) call never_call_me()
52 if (size (real_kinds
) < 2) call never_call_me()
53 if (any (real_kinds(1:2) /= [4,8])) call never_call_me()