* config/pa/linux-atomic.c (__kernel_cmpxchg): Reorder arguments to
[official-gcc.git] / gcc / testsuite / gfortran.fortran-torture / execute / intrinsic_mmloc_3.f90
blob078a08d70b44e4243eb2aaf9fac81ebe247ffcef
1 ! Check we do the right thing with extreme values.
2 ! From PR12704
3 program intrinsic_mmloc_3
4 integer, dimension(2) :: d
5 integer, dimension(2,2) :: a
6 logical, dimension(2) :: k
7 logical, dimension(2,2) :: l
9 k = .true.
10 l = .true.
12 d = -huge (d)
13 if (maxloc (d, 1) .ne. 1) call abort ()
15 d = huge (d)
16 if (minloc (d, 1) .ne. 1) call abort ()
18 d = -huge (d)
19 if (maxloc (d, 1, k) .ne. 1) call abort ()
21 d = huge (d)
22 if (minloc (d, 1, k) .ne. 1) call abort ()
24 a = -huge (a)
25 d = maxloc (a)
26 if (any (d .ne. 1)) call abort ()
28 a = huge (a)
29 d = minloc (a)
30 if (any (d .ne. 1)) call abort ()
32 a = -huge (a)
33 d = maxloc (a, l)
34 if (any (d .ne. 1)) call abort ()
36 a = huge (a)
37 d = minloc (a, l)
38 if (any (d .ne. 1)) call abort ()
40 end program