1 ! Program to test SELECTED_REAL_KIND intrinsic function.
7 i4 = int (log10 (huge (r4)))
8 t = - int (log10 (tiny (r4)))
11 i8 = int (log10 (huge (r8)))
12 t = - int (log10 (tiny (r8)))
15 res = selected_real_kind (r = i4)
16 if (res .ne. 4) call abort
18 res = selected_real_kind (r = i8)
19 if (res .ne. 8) call abort
21 res = selected_real_kind (r = (i8 + 1))
22 if (res .ne. -2) call abort
24 res = selected_real_kind (p = precision (r4))
25 if (res .ne. 4) call abort
27 res = selected_real_kind (p = precision (r4), r = i4)
28 if (res .ne. 4) call abort
30 res = selected_real_kind (p = precision (r4), r = i8)
31 if (res .ne. 8) call abort
33 res = selected_real_kind (p = precision (r4), r = i8 + 1)
34 if (res .ne. -2) call abort
36 res = selected_real_kind (p = precision (r8))
37 if (res .ne. 8) call abort
39 res = selected_real_kind (p = precision (r8), r = i4)
40 if (res .ne. 8) call abort
42 res = selected_real_kind (p = precision (r8), r = i8)
43 if (res .ne. 8) call abort
45 res = selected_real_kind (p = precision (r8), r = i8 + 1)
46 if (res .ne. -2) call abort
48 res = selected_real_kind (p = (precision (r8) + 1))
49 if (res .ne. -1) call abort
51 res = selected_real_kind (p = (precision (r8) + 1), r = i4)
52 if (res .ne. -1) call abort
54 res = selected_real_kind (p = (precision (r8) + 1), r = i8)
55 if (res .ne. -1) call abort
57 res = selected_real_kind (p = (precision (r8) + 1), r = i8 + 1)
58 if (res .ne. -3) call abort