https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79540
--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Could you please uncomment the line
!print *, "print '", fmt(:fmt_len), "', ", x, " ! => ", str(:len), ": ",
reason
and post the result?