https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104811
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:47f89da89eb0ddc9ed87192886ff633a790fe08c commit r11-9652-g47f89da89eb0ddc9ed87192886ff633a790fe08c Author: Harald Anlauf <anl...@gmx.de> Date: Tue Mar 8 21:47:04 2022 +0100 Fortran: do not frontend-optimize MINLOC/MAXLOC for character arrays gcc/fortran/ChangeLog: PR fortran/104811 * frontend-passes.c (optimize_minmaxloc): Do not attempt frontend-optimization of MINLOC/MAXLOC for character arrays, as there is no suitable code yet for inline expansion. gcc/testsuite/ChangeLog: PR fortran/104811 * gfortran.dg/minmaxloc_16.f90: New test. (cherry picked from commit e3e369dad6cbecb1b490b3f3b154c600fba5a6f3)