This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/14901] New: Internal writes do not pad with blanks
- From: "schnetter at aei dot mpg dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Apr 2004 19:53:34 -0000
- Subject: [Bug fortran/14901] New: Internal writes do not pad with blanks
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Internal writes do not seem to pad the string with blanks. The following
small programme illustrates the problem:
subroutine x (a)
implicit none
character(*) a
print *,len(a),"[",a,"]"
end subroutine x
character s*10
write (s, '("hello")')
call x (trim(s))
write (s, '("hello ")')
call x (trim(s))
end program
The programm should output
5 [hello]
5 [hello]
but it prints instead
10 [hello
]
5 [hello]
indicating that there are leftover characters in the second half of the string
s that should not be there.
--
Summary: Internal writes do not pad with blanks
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schnetter at aei dot mpg dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14901