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

* [Bug fortran/14901] Internal writes do not pad with blanks
  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 ` schnetter at aei dot mpg dot de
  2004-04-10  2:42 ` bdavis9659 at comcast dot net
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: schnetter at aei dot mpg dot de @ 2004-04-09 19:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schnetter at aei dot mpg dot de  2004-04-09 19:57 -------
This was with 
 
$ ~/gcc-3.5-tree-ssa/bin/gfortran --version                                 
GNU Fortran 95 (GCC 3.5-tree-ssa 20040402 (merged 20040331)) 
 
The error occurs also when the call to trim is removed. 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14901


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

* [Bug fortran/14901] Internal writes do not pad with blanks
  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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bdavis9659 at comcast dot net @ 2004-04-10  2:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis9659 at comcast dot net  2004-04-10 02:24 -------
patch here
http://gcc.gnu.org/ml/fortran/2004-04/msg00075.html

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14901


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

* [Bug libfortran/14901] Internal writes do not pad with blanks
  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 ` 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
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-10  2:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-10 02:28 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|fortran                     |libfortran
     Ever Confirmed|                            |1
           Keywords|                            |patch
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-10 02:28:41
               date|                            |
   Target Milestone|---                         |tree-ssa


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14901


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

* [Bug libfortran/14901] Internal writes do not pad with blanks
  2004-04-09 19:53 [Bug fortran/14901] New: Internal writes do not pad with blanks schnetter at aei dot mpg dot de
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-04-11 17:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-04-11 16:16 -------
Subject: Bug 14901

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	tree-ssa-20020619-branch
Changes by:	bdavis@gcc.gnu.org	2004-04-11 16:16:38

Modified files:
	gcc/testsuite  : ChangeLog.tree-ssa 
	libgfortran    : ChangeLog 
	libgfortran/io : transfer.c unix.c 
Added files:
	gcc/testsuite/gfortran.fortran-torture/execute: 
	                                                internal_write.f90 

Log message:
	PR fortran/14901
	* gfortran.fortran-torture/execute/internal_write.f90 : New test.
	* gcc/libgfortran/io/transfer.c (next_record_w) : No '\n' if internal.
	* io/unix.c (empty_internal_buffer) : Init to spaces, not '\n'.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.220&r2=1.1.2.221
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.fortran-torture/execute/internal_write.f90.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.42&r2=1.1.2.43
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/transfer.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.12&r2=1.1.2.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/unix.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.5&r2=1.1.2.6



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14901


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

* [Bug libfortran/14901] Internal writes do not pad with blanks
  2004-04-09 19:53 [Bug fortran/14901] New: Internal writes do not pad with blanks schnetter at aei dot mpg dot de
                   ` (3 preceding siblings ...)
  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
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-16  7:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-16 02:33 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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).