https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111304
--- Comment #1 from Baptiste Demoulin <mailling-lists-bd at posteo dot de> --- One comment: replacing `trim(prefix)` with `prefix(1:len_trim(prefix))` leads to the same result, as does putting simply `prefix`, so the problem does not seem to be related to using the `trim` function.