https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61632
--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Sorry! There is still a glitch: the following code
program p
call ss()
call ss()
end program p
subroutine ss
CHARACTER(3), save :: ZTYP(3)
DATA ZTYP /'XXX','YYY','ZZZ'/
write(*,600) 0.0,ZTYP
600 FORMAT(1PE13.5,A3)
end subroutine ss
used to give the runtime error
0.00000E+00XXX
At line 8 of file pr61632_1.f90 (unit = 6, file = 'stdout')
Fortran runtime error: Expected REAL for item 3 in formatted transfer, got
CHARACTER
(1PE13.5,A3)
^
and I think the position of the caret is right. With the patch at
https://gcc.gnu.org/ml/fortran/2014-07/msg00107.html
it is
0.00000E+00XXX
At line 8 of file pr61632_1.f90 (unit = 6, file = 'stdout')
Fortran runtime error: Expected REAL for item 3 in formatted transfer, got
CHARACTER
(1PE13.5,A3)
^
i.e., the caret position does not seem right. Your patch probably does not take
into account the fact that the third item of the output uses the first item of
the format (periodic "extension").
Otherwise I have run
make -k check-gfortran RUNTESTFLAGS="dg.exp=fmt*
--target_board=unix'{-m32,-m64}'"
without regression.