$ cat minmax.f90 real, dimension(2) :: a logical :: m a = (/ 1.0, 2.0 /) m = .true. print *,minloc(a, m) !print *,minval(a, m) end $ gfortran -static minmax.f90 && ./a.out a.out: ../../../../trunk/libgfortran/generated/minloc0_4_r4.c:235: mminloc0_4_r4: Assertion `((mask)->dtype >> 6) == 8' failed. Aborted
I'm filing this with "fortran" as component since we should get rid of the scalar mask in the front-end... -- Summary: (min|max)loc with scalar mask aborts at runtime Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fxcoudert at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26182