diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/minmaxloc_6.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/minmaxloc_6.f90 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/minmaxloc_6.f90 b/gcc/testsuite/gfortran.dg/minmaxloc_6.f90 new file mode 100644 index 000000000..c61fab47e --- /dev/null +++ b/gcc/testsuite/gfortran.dg/minmaxloc_6.f90 @@ -0,0 +1,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 |