modula2: Simplify REAL/LONGREAL/SHORTREAL node creation.
[official-gcc.git] / gcc / testsuite / gfortran.dg / minmaxloc_5.f90
blob2f2b82ee0527f7d2f21786426d69b11cc61f80d8
1 ! { dg-do run }
2 ! PR35994 [4.3/4.4 regression] MAXLOC and MINLOC off by one with mask
3 program GA4076
4 REAL DDA(100)
5 dda = (/(J1,J1=1,100)/)
6 IDS = MAXLOC(DDA,1)
7 if (ids.ne.100) STOP 1!expect 100
9 IDS = MAXLOC(DDA,1, (/(J1,J1=1,100)/) > 50)
10 if (ids.ne.100) STOP 2!expect 100
12 IDS = minLOC(DDA,1)
13 if (ids.ne.1) STOP 3!expect 1
15 IDS = MinLOC(DDA,1, (/(J1,J1=1,100)/) > 50)
16 if (ids.ne.51) STOP 4!expect 51
18 END