Dear Fortranners, scalariziation of the elemental intrinsic LEN_TRIM was ICEing when the optional KIND argument was present. The cleanest solution is to use the infrastructure added by Mikael's fix for PR97896. In that case it is a 1-liner. :-) That fix is available on mainline and on 11-branch only, though. My suggestion is to fix the current PR only for the same branches, leaving the regression unfixed for older ones. Regtested on x86_64-pc-linux-gnu. OK for mainline and 11-branch? Thanks, Harald