https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87711
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:721d8b9e26bf8205c1f2125c2626919a408cdbe4 commit r12-5473-g721d8b9e26bf8205c1f2125c2626919a408cdbe4 Author: Harald Anlauf <anl...@gmx.de> Date: Tue Nov 23 17:51:38 2021 +0100 Fortran: fix scalarization for intrinsic LEN_TRIM with present KIND argument gcc/fortran/ChangeLog: PR fortran/87711 PR fortran/87851 * trans-array.c (arg_evaluated_for_scalarization): Add LEN_TRIM to list of intrinsics for which an optional KIND argument needs to be removed before scalarization. gcc/testsuite/ChangeLog: PR fortran/87711 PR fortran/87851 * gfortran.dg/len_trim.f90: New test.