> Yes, I'll be looking into this soon.
We have a related regression on SPARC:
FAIL: gfortran.dg/minmaxloc_5.f90 -O3 -fomit-frame-pointer -funroll-loops
execution test
FAIL: gfortran.dg/minmaxloc_5.f90 -O3 -fomit-frame-pointer -funroll-all-loops
-finline-functions execution test
FAIL: gfortran.dg/minmaxloc_6.f90 -O3 -fomit-frame-pointer -funroll-loops
execution test
FAIL: gfortran.dg/minmaxloc_6.f90 -O3 -fomit-frame-pointer -funroll-all-loops
-finline-functions execution test
whose failure mode is exactly the same as for Honza's testcase. I even have a
more reduced testcase (6 lines, attached) in case you'd prefer working on it.
Reproducible with a cross to sparc-linux with -mcpu=v8 -O3 -funroll-loops and
grepping for mem:SF (const_int 0 [0]) in the RTL dumps.
--
Eric Botcazou
program GA4076
REAL DDA(100)
dda = (/(J1,J1=1,100)/)
IDS = MAXLOC(DDA,1)
if (ids.ne.100) call abort
END