summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/minmaxloc_6.f90
blob: c61fab47edf0a2b583f91703d25dda4744f58d0b (plain)
1
2
3
4
5
6
7
8
9
10
11
! { dg-do run }
! PR35994 [4.3/4.4 regression] MAXLOC and MINLOC off by one with mask
  REAL DDA(5:104)
  dda = (/(J1,J1=1,100)/)

  IDS = MAXLOC(DDA,1)
  if (ids.ne.100) call abort  !expect 100
  IDS = MAXLOC(DDA,1, (/(J1,J1=1,100)/) > 50)
  if (ids.ne.100) call abort  !expect 100

  END