public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/14901] New: Internal writes do not pad with blanks
@ 2004-04-09 19:53 schnetter at aei dot mpg dot de
  2004-04-09 19:57 ` [Bug fortran/14901] " schnetter at aei dot mpg dot de
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: schnetter at aei dot mpg dot de @ 2004-04-09 19:53 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-04-16  2:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-09 19:53 [Bug fortran/14901] New: Internal writes do not pad with blanks schnetter at aei dot mpg dot de
2004-04-09 19:57 ` [Bug fortran/14901] " schnetter at aei dot mpg dot de
2004-04-10  2:42 ` bdavis9659 at comcast dot net
2004-04-10  2:44 ` [Bug libfortran/14901] " pinskia at gcc dot gnu dot org
2004-04-11 17:47 ` cvs-commit at gcc dot gnu dot org
2004-04-16  7:56 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).