https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36313
Bil Kleb <Bil.Kleb at NASA dot gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Bil.Kleb at NASA dot gov --- Comment #7 from Bil Kleb <Bil.Kleb at NASA dot gov> --- Hi, Regression or documentation skew? Per 4.4.5 documentation, viz., https://gcc.gnu.org/onlinedocs/gcc-4.4.5/gfortran/MINLOC.html the MINLOC ARRAY argument could be INTEGER, REAL, or CHARACTER; but as of 4.9.1, this is no longer the case? $ cat > test_char_maxloc.f90 << EOF program test_f2003_minloc_char character(20), dimension(5) :: strings data strings / 'close', 'closer', 'find_my_index', 'far', 'farther' / print*,sum(minloc(strings,strings=='find_my_index')) end program EOF $ gfortran --version | head -1 GNU Fortran (Homebrew gcc 4.9.1) 4.9.1 $ gfortran test_char_maxloc.f90 test_char_maxloc.f90:4.20: print*,sum(minloc(strings,strings=='find_my_index')) 1 Error: 'array' argument of 'minloc' intrinsic at (1) must be INTEGER or REAL And wasn't the case at 4.4.7: $ gfortran --version | head -1 GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) $ gfortran test_char_maxloc.f90 test_char_maxloc.f90:4.20: print*,sum(minloc(strings,strings=='find_my_index')) 1 Error: 'array' argument of 'minloc' intrinsic at (1) must be INTEGER or REAL