2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / maxloc_1.f90
blob41115eda9819a7099fc0a95354c993f7e8f1f5f2
1 ! { dg-do run }
2 integer :: a(3), n
3 a(1) = -huge(n)
4 a(2) = -huge(n)
5 a(3) = -huge(n)
6 a(1) = a(1) - 1
7 a(2) = a(2) - 1
8 a(3) = a(3) - 1
9 n = maxloc (a, dim = 1)
10 if (n .ne. 1) call abort
11 a(2) = -huge(n)
12 n = maxloc (a, dim = 1)
13 if (n .ne. 2) call abort
14 end