1 ! Program to test min and max intrinsics
2 program intrinsic_minmax
11 if (min (i
, k
) .ne
. 1) call abort
12 if (min (i
, j
, k
, m
) .ne
. -2) call abort
13 if (max (i
, k
) .ne
. 3) call abort
14 if (max (i
, j
, k
, m
) .ne
. 4) call abort
15 if (max (i
+1, j
) .ne
. 2) call abort
21 if (min (r
, t
) .ne
. 1) call abort
22 if (min (r
, s
, t
, u
) .ne
. -2) call abort
23 if (max (r
, t
) .ne
. 3) call abort
24 if (max (r
, s
, t
, u
) .ne
. 4) call abort
26 if (max (4d0, r
) .ne
. 4d0) call abort
27 if (amax0 (i
, j
) .ne
. 1.0) call abort
28 if (min1 (r
, s
) .ne
. -2) call abort
31 if (min (1, -2, 3, 4) .ne
. -2) call abort
32 if (max (1, -2, 3, 4) .ne
. 4) call abort
33 if (amax0 (1, -2) .ne
. 1.0) call abort
34 if (min1 (1., -2.) .ne
. -2) call abort