1! { dg-do run } 2! PR35994 [4.3/4.4 regression] MAXLOC and MINLOC off by one with mask 3program GA4076 4 REAL DDA(100) 5 dda = (/(J1,J1=1,100)/) 6 IDS = MAXLOC(DDA,1) 7 if (ids.ne.100) call abort !expect 100 8 9 IDS = MAXLOC(DDA,1, (/(J1,J1=1,100)/) > 50) 10 if (ids.ne.100) call abort !expect 100 11 12 IDS = minLOC(DDA,1) 13 if (ids.ne.1) call abort !expect 1 14 15 IDS = MinLOC(DDA,1, (/(J1,J1=1,100)/) > 50) 16 if (ids.ne.51) call abort !expect 51 17 18END 19