PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / minmaxloc_4.f90
blob673739518dcbb695fc7c98a1126d4110b6e34d24
1 ! { dg-do run }
2 ! Test to make sure that PR 33354 remains fixed and doesn't regress
3 PROGRAM TST
4 IMPLICIT NONE
5 REAL :: A(1,3)
6 A(:,1) = 10
7 A(:,2) = 20
8 A(:,3) = 30
10 !WRITE(*,*) SUM(A(:,1:3),1)
11 !WRITE(*,*) MINLOC(SUM(A(:,1:3),1),1)
12 if (minloc(sum(a(:,1:3),1),1) .ne. 1) call abort()
13 if (maxloc(sum(a(:,1:3),1),1) .ne. 3) call abort()
15 END PROGRAM TST