[flang][runtime] Treatment of NaN in MAXVAL/MAXLOC/MINVAL/MINLOC (#76999)
Detect NaN elements in data and handle them like gfortran does (at runtime); namely, NaN can be returned if all the data are NaNs, but any non-NaN value is preferable. Ensure that folding returns the same results as runtime computation. Fixes llvm-test-suite/Fortran/gfortran/regression/maxloc_2.f90 (and probably others).
parent
927b8a0f
Please register or sign in to comment