Consider the following code:
program test
implicit none
character(40) line
line = 'Hello World!'
write (line, '(i3, 2x, a)') 7, trim(line)
print *, line
end program
With the gfortran compiler (v4.5.1) the output is:
7 7lo World!
I would expect the output to be
7 Hello World!
-- David
--
Summary: gfortran internal write bug
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: david dot sagan at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45463