public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: fortran/4885: BACKSPACE example that doesn't work as of  gcc/g77-3.0.x
@ 2001-11-05 14:11 Toon Moene
  0 siblings, 0 replies; 14+ messages in thread
From: Toon Moene @ 2001-11-05 14:11 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: Toon Moene <toon@moene.indiv.nluug.nl>
To: Youngjean Jung <yjjung@newton.me.berkeley.edu>
Cc: Tim Prince <tprince@computer.org>, gcc-gnats@gcc.gnu.org
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of 
 gcc/g77-3.0.x
Date: Fri, 16 Nov 2001 21:31:41 +0100

 Youngjean Jung wrote:
 
 > I conducted many tests on the Endfile, Backspace commands. They don't
 > work in the following senses:
 > 
 > 1) Endfile command writes meaningless letters on the data file.
 > 2) Endfile, Backspace combination doesn't make a 'backspace job'.
 
 >       program test
 > c
 >       implicit none
 >       integer  i,k
 > c
 >       do i=1,10
 >         open(1,file='s2.dat',status='unknown',access='sequential')
 >         do k=10,20
 >            write(1,*) i,k
 >            endfile 1
 >            backspace 1
 >         end do
 >         close(1)
 >       end do
 > c
 >       end
 
 Hmmm, I get the same s2.dat as you get (Debian GNU/Linux 2.2,
 gcc/g77-3.0.2):
 
 toon@laptop:~/g77-bugs$ cat s2.dat
  10 10
  10 11
  10 12
  10 13
  10 14
  10 15
  10 16
  10 17
  10 18
  10 19
  10 20
 
 This seems to be in accordance with the Standard:
 
 12.10.4.1 BACKSPACE Statement.
 
 Execution of a BACKSPACE statement causes the file connected to the
 specified unit to be positioned before the preceding record. If there is
 no preceding record, the position of the file is not changed. Note that
 if the preceding record is an endfile record, the file becomes
 positioned before the endfile record. 
 
 In other words, your backspace only backspaces over the endfile record
 (as per the standard).  If you want to backspace over the record you
 just wrote, you have to backspace twice.
 
 [Tim - does this mean I can close fortran/4885 ?  Thanks]
 
 -- 
 Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
 Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
 Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
 Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


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

* Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
@ 2001-12-03 15:56 toon
  0 siblings, 0 replies; 14+ messages in thread
From: toon @ 2001-12-03 15:56 UTC (permalink / raw)
  To: toon; +Cc: gcc-prs

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: toon@gcc.gnu.org
To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
  nobody@gcc.gnu.org, toon@gcc.gnu.org, toon@moene.indiv.nluug.nl,
  yjjung@newton.me.berkeley.edu
Cc:  
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
Date: 3 Dec 2001 23:54:21 -0000

 Synopsis: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
 
 Responsible-Changed-From-To: unassigned->toon
 Responsible-Changed-By: toon
 Responsible-Changed-When: Mon Dec  3 15:54:20 2001
 Responsible-Changed-Why:
     My job.
 State-Changed-From-To: open->closed
 State-Changed-By: toon
 State-Changed-When: Mon Dec  3 15:54:20 2001
 State-Changed-Why:
     Fixed in 3.0.3 and 3.1
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4885&database=gcc


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

* Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
@ 2001-12-03 15:54 toon
  0 siblings, 0 replies; 14+ messages in thread
From: toon @ 2001-12-03 15:54 UTC (permalink / raw)
  To: gcc-bugs, gcc-gnats, gcc-prs, nobody, toon, toon, yjjung

Synopsis: BACKSPACE example that doesn't work as of gcc/g77-3.0.x

Responsible-Changed-From-To: unassigned->toon
Responsible-Changed-By: toon
Responsible-Changed-When: Mon Dec  3 15:54:20 2001
Responsible-Changed-Why:
    My job.
State-Changed-From-To: open->closed
State-Changed-By: toon
State-Changed-When: Mon Dec  3 15:54:20 2001
State-Changed-Why:
    Fixed in 3.0.3 and 3.1

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4885&database=gcc


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

* Re: fortran/4885: BACKSPACE example that doesn't work as of   gcc/g77-3.0.x
@ 2001-11-08 19:26 Toon Moene
  0 siblings, 0 replies; 14+ messages in thread
From: Toon Moene @ 2001-11-08 19:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: Toon Moene <toon@moene.indiv.nluug.nl>
To: Youngjean Jung <yjjung@newton.me.berkeley.edu>
Cc: Tim Prince <tprince@computer.org>, gcc-gnats@gcc.gnu.org
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of  
 gcc/g77-3.0.x
Date: Fri, 16 Nov 2001 23:07:58 +0100

 Youngjean Jung wrote:
 
 > Don't you have any gabage letters in s2.dat?
 
 Ah, I finally see what you mean - it just didn't show up because I only
 did a cat of the s2.dat file.
 
 This is what od tells me:
 
 toon@laptop:~/g77-bugs$ od -c s2.dat
 0000000       1   0       1   0  \n  \0  \0  \0  \0  \0  \0  \0  \0  \0
 0000020  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
 *
 0001040  \0  \0       1   0       1   1  \n       1   0       1   2  \n
 0001060       1   0       1   3  \n       1   0       1   4  \n       1
 0001100   0       1   5  \n       1   0       1   6  \n       1   0    
 0001120   1   7  \n       1   0       1   8  \n       1   0       1   9
 0001140  \n       1   0       2   0  \n
 0001150
 
 This obviously is not correct.  I'll look into this problem later this
 weekend.
 
 -- 
 Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
 Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
 Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
 Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


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

* Re: fortran/4885: BACKSPACE example that doesn't work as of  gcc/g77-3.0.x
@ 2001-11-06  4:46 Youngjean Jung
  0 siblings, 0 replies; 14+ messages in thread
From: Youngjean Jung @ 2001-11-06  4:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: Youngjean Jung <yjjung@newton.me.berkeley.edu>
To: Toon Moene <toon@moene.indiv.nluug.nl>
Cc: Youngjean Jung <yjjung@newton.me.berkeley.edu>,
        Tim Prince <tprince@computer.org>, gcc-gnats@gcc.gnu.org
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of  gcc/g77-3.0.x
Date: Fri, 16 Nov 2001 16:07:41 -0800

 Dear Mr. Toon Moene and Mr. Tim Prince :
 
 Thank you so much for your kind attention. It really helps me to resolve 
 the problem, even though I feel that using backspace twice seems kind of 
 silly. Anyhow, I can resolve the problem. You are the best and kindest 
 programmers I ever met in internet. I have been using FEAP ( Finite 
 Element Analysis Program) developed by Berkeley and Stanford faculties, 
 which is not yet comercialized for research purpose. Even though Fortran 
 is getting old language, most FEM and FDM in solid and fluid mechanics 
 are still using Fortran. In the sense, the necessity of g77 doesn't 
 vanish at all.
 Many people like me still get the benefit of your effort.
 
 I appreciate you for your help again.
 
 Cheers,
 
 Youngjean Jung
 Ph. D. Candidate
 Computational Mechanics Lab
 Deptment of Mechanical Engineering
 University of California, Berkeley
 
 Toon Moene wrote:
 
 >Youngjean Jung wrote:
 >
 >>I conducted many tests on the Endfile, Backspace commands. They don't
 >>work in the following senses:
 >>
 >>1) Endfile command writes meaningless letters on the data file.
 >>2) Endfile, Backspace combination doesn't make a 'backspace job'.
 >>
 >
 >>      program test
 >>c
 >>      implicit none
 >>      integer  i,k
 >>c
 >>      do i=1,10
 >>        open(1,file='s2.dat',status='unknown',access='sequential')
 >>        do k=10,20
 >>           write(1,*) i,k
 >>           endfile 1
 >>           backspace 1
 >>        end do
 >>        close(1)
 >>      end do
 >>c
 >>      end
 >>
 >
 >Hmmm, I get the same s2.dat as you get (Debian GNU/Linux 2.2,
 >gcc/g77-3.0.2):
 >
 >toon@laptop:~/g77-bugs$ cat s2.dat
 > 10 10
 > 10 11
 > 10 12
 > 10 13
 > 10 14
 > 10 15
 > 10 16
 > 10 17
 > 10 18
 > 10 19
 > 10 20
 >
 >This seems to be in accordance with the Standard:
 >
 >12.10.4.1 BACKSPACE Statement.
 >
 >Execution of a BACKSPACE statement causes the file connected to the
 >specified unit to be positioned before the preceding record. If there is
 >no preceding record, the position of the file is not changed. Note that
 >if the preceding record is an endfile record, the file becomes
 >positioned before the endfile record. 
 >
 >In other words, your backspace only backspaces over the endfile record
 >(as per the standard).  If you want to backspace over the record you
 >just wrote, you have to backspace twice.
 >
 >[Tim - does this mean I can close fortran/4885 ?  Thanks]
 >
 
 


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

* Re: fortran/4885: BACKSPACE example that doesn't work as of  gcc/g77-3.0.x
@ 2001-11-05 16:27 Tim Prince
  0 siblings, 0 replies; 14+ messages in thread
From: Tim Prince @ 2001-11-05 16:27 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: "Tim Prince" <tprince@computer.org>
To: "Toon Moene" <toon@moene.indiv.nluug.nl>,
	"Youngjean Jung" <yjjung@newton.berkeley.edu>
Cc: <gcc-gnats@gcc.gnu.org>
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of  gcc/g77-3.0.x
Date: Fri, 16 Nov 2001 13:30:41 -0800

 I'll buy both of you a beer if we ever meet, if we can check 6 Fortran
 compilers without finding one which fails to implement this part of the
 standard correctly.  But, it makes sense, in a way, and it seems g77 is
 following it.  Even in a relatively simply language like g77, we have many
 non-conformant applications which just happen to have worked for quite a
 while, and even relative experts in the language don't always have the
 answer.
 ----- Original Message -----
 From: "Toon Moene" <toon@moene.indiv.nluug.nl>
 To: "Youngjean Jung" <yjjung@newton.berkeley.edu>
 Cc: "Tim Prince" <tprince@computer.org>; <gcc-gnats@gcc.gnu.org>
 Sent: Friday, November 16, 2001 12:31 PM
 Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of
 gcc/g77-3.0.x
 
 
 > Youngjean Jung wrote:
 >
 > > I conducted many tests on the Endfile, Backspace commands. They don't
 > > work in the following senses:
 > >
 > > 1) Endfile command writes meaningless letters on the data file.
 > > 2) Endfile, Backspace combination doesn't make a 'backspace job'.
 >
 > >       program test
 > > c
 > >       implicit none
 > >       integer  i,k
 > > c
 > >       do i=1,10
 > >         open(1,file='s2.dat',status='unknown',access='sequential')
 > >         do k=10,20
 > >            write(1,*) i,k
 > >            endfile 1
 > >            backspace 1
 > >         end do
 > >         close(1)
 > >       end do
 > > c
 > >       end
 >
 > Hmmm, I get the same s2.dat as you get (Debian GNU/Linux 2.2,
 > gcc/g77-3.0.2):
 >
 > toon@laptop:~/g77-bugs$ cat s2.dat
 >  10 10
 >  10 11
 >  10 12
 >  10 13
 >  10 14
 >  10 15
 >  10 16
 >  10 17
 >  10 18
 >  10 19
 >  10 20
 >
 > This seems to be in accordance with the Standard:
 >
 > 12.10.4.1 BACKSPACE Statement.
 >
 > Execution of a BACKSPACE statement causes the file connected to the
 > specified unit to be positioned before the preceding record. If there is
 > no preceding record, the position of the file is not changed. Note that
 > if the preceding record is an endfile record, the file becomes
 > positioned before the endfile record.
 >
 > In other words, your backspace only backspaces over the endfile record
 > (as per the standard).  If you want to backspace over the record you
 > just wrote, you have to backspace twice.
 >
 > [Tim - does this mean I can close fortran/4885 ?  Thanks]
 >
 > --
 > Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
 > Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
 > Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
 > Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
 


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

* Re: fortran/4885: BACKSPACE example that doesn't work as of  gcc/g77-3.0.x
@ 2001-11-05 15:39 Youngjean Jung
  0 siblings, 0 replies; 14+ messages in thread
From: Youngjean Jung @ 2001-11-05 15:39 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: Youngjean Jung <yjjung@newton.me.berkeley.edu>
To: Toon Moene <toon@moene.indiv.nluug.nl>
Cc: Youngjean Jung <yjjung@newton.me.berkeley.edu>,
        Tim Prince <tprince@computer.org>, gcc-gnats@gcc.gnu.org
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of  gcc/g77-3.0.x
Date: Fri, 16 Nov 2001 12:56:07 -0800

 This is a multi-part message in MIME format.
 --------------010709020609050205090709
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Dear Mr. Toon Moene :
 
 Don't you have any gabage letters in s2.dat?
 
 Youngjean
 
 Toon Moene wrote:
 
 >Youngjean Jung wrote:
 >
 >>I conducted many tests on the Endfile, Backspace commands. They don't
 >>work in the following senses:
 >>
 >>1) Endfile command writes meaningless letters on the data file.
 >>2) Endfile, Backspace combination doesn't make a 'backspace job'.
 >>
 >
 >>      program test
 >>c
 >>      implicit none
 >>      integer  i,k
 >>c
 >>      do i=1,10
 >>        open(1,file='s2.dat',status='unknown',access='sequential')
 >>        do k=10,20
 >>           write(1,*) i,k
 >>           endfile 1
 >>           backspace 1
 >>        end do
 >>        close(1)
 >>      end do
 >>c
 >>      end
 >>
 >
 >Hmmm, I get the same s2.dat as you get (Debian GNU/Linux 2.2,
 >gcc/g77-3.0.2):
 >
 >toon@laptop:~/g77-bugs$ cat s2.dat
 > 10 10
 > 10 11
 > 10 12
 > 10 13
 > 10 14
 > 10 15
 > 10 16
 > 10 17
 > 10 18
 > 10 19
 > 10 20
 >
 >This seems to be in accordance with the Standard:
 >
 >12.10.4.1 BACKSPACE Statement.
 >
 >Execution of a BACKSPACE statement causes the file connected to the
 >specified unit to be positioned before the preceding record. If there is
 >no preceding record, the position of the file is not changed. Note that
 >if the preceding record is an endfile record, the file becomes
 >positioned before the endfile record. 
 >
 >In other words, your backspace only backspaces over the endfile record
 >(as per the standard).  If you want to backspace over the record you
 >just wrote, you have to backspace twice.
 >
 >[Tim - does this mean I can close fortran/4885 ?  Thanks]
 >
 
 
 --------------010709020609050205090709
 Content-Type: application/octet-stream;
  name="s2.dat"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment;
  filename="s2.dat"
 
 IDEwIDEwCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAIDEwIDExCiAxMCAxMgogMTAgMTMKIDEwIDE0CiAxMCAxNQogMTAgMTYKIDEwIDE3
 CiAxMCAxOAogMTAgMTkKIDEwIDIwCg==
 --------------010709020609050205090709--
 


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

* Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
@ 2001-11-05 15:08 Youngjean Jung
  0 siblings, 0 replies; 14+ messages in thread
From: Youngjean Jung @ 2001-11-05 15:08 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: Youngjean Jung <yjjung@newton.me.berkeley.edu>
To: Tim Prince <tprince@computer.org>
Cc: toon@moene.indiv.nluug.nl, gcc-gnats@gcc.gnu.org,
        Youngjean Jung <yjjung@newton.me.berkeley.edu>
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
Date: Fri, 16 Nov 2001 12:45:18 -0800

 This is a multi-part message in MIME format.
 --------------070306030405080305010403
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Dear Tim Prince :
 
 Another funny examples in which the backspace works and doesn't work. 
 test5.f works but test6.f doesn't work even though I changed
 
 write(1,*) i,k              to             write(1,*) 'start'
 
 I tried many combinations of endfile and backspace commands. But they 
 never work correctly.
 
 Sincerely,
 
 Youngjean.
 
 Tim Prince wrote:
 
 >g77 3.1 20011031 has no apparent problem with this on i686-pc-cygwin.
 >----- Original Message -----
 >From: <toon@moene.indiv.nluug.nl>
 >To: <gcc-gnats@gcc.gnu.org>
 >Cc: "Youngjean Jung" <yjjung@newton.berkeley.edu>
 >Sent: Thursday, November 15, 2001 1:10 PM
 >Subject: fortran/4885: BACKSPACE example that doesn't work as of
 >gcc/g77-3.0.x
 >
 >
 >>>Number:         4885
 >>>Category:       fortran
 >>>Synopsis:       BACKSPACE example that doesn't work as of gcc/g77-3.0.x
 >>>Confidential:   no
 >>>Severity:       serious
 >>>Priority:       medium
 >>>Responsible:    unassigned
 >>>State:          open
 >>>Class:          sw-bug
 >>>Submitter-Id:   net
 >>>Arrival-Date:   Thu Nov 15 13:16:01 PST 2001
 >>>Closed-Date:
 >>>Last-Modified:
 >>>Originator:     Youngjean Jung
 >>>Release:        3.0 and higher
 >>>Organization:
 >>>Environment:
 >>>
 >>Debian GNU/Linux 2.2
 >>
 >>>Description:
 >>>
 >> The following code:
 >>
 >>      open(51,file='s1.dat',status='unknown',access='sequential')
 >>      do k=1,100
 >>      call plot(k)
 >>      end do
 >>      close(51)
 >>      end
 >>      subroutine plot(k)
 >>      j=0
 >>      do i=1,10
 >>        if(j.lt.5) then
 >>           j=j+1
 >>        else
 >>           backspace 51
 >>        endif
 >>        write(51,*) j, k
 >>      end do
 >>      end
 >>
 >>gives:
 >>
 >>$ ./a.out
 >>$ ./a.out
 >>backspace: end of file
 >>apparent state: unit 51 named s1.dat
 >>last format: list io
 >>lately writing direct formatted external IO
 >>Aborted
 >>
 >>[Note: for the failure to appear, the code has to be run
 >> a second time]
 >>
 >>>How-To-Repeat:
 >>>
 >>>Fix:
 >>>
 >>>Release-Note:
 >>>Audit-Trail:
 >>>Unformatted:
 >>>
 >
 >
 
 
 --------------070306030405080305010403
 Content-Type: text/plain;
  name="test5.f"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="test5.f"
 
       program test
 c
       implicit none
       integer  i,k    
 c
       do i=1,10
         open(unit=1,file='s1.dat',status='unknown',access='sequential')
         write(1,*) 'start' 
         do k=10,20 
            write(1,*) i,k 
            backspace (unit=1)
            write(1,*) i,k
            backspace (unit=1)
         end do
            write(1,*) 'end'
         endfile (unit=1)
         close(unit=1)
       end do
 c
       end
 c
 c
 
 
 --------------070306030405080305010403
 Content-Type: text/plain;
  name="test6.f"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="test6.f"
 
       program test
 c
       implicit none
       integer  i,k    
 c
       do i=1,10
         open(unit=1,file='s1.dat',status='unknown',access='sequential')
         write(1,*) 'start' 
         do k=10,20 
            write(1,*) 'start' 
            backspace (unit=1)
            write(1,*) i,k
            backspace (unit=1)
         end do
            write(1,*) 'end'
         endfile (unit=1)
         close(unit=1)
       end do
 c
       end
 c
 c
 
 
 --------------070306030405080305010403--
 


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

* Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
@ 2001-11-05 14:01 Youngjean Jung
  0 siblings, 0 replies; 14+ messages in thread
From: Youngjean Jung @ 2001-11-05 14:01 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: Youngjean Jung <yjjung@newton.me.berkeley.edu>
To: Tim Prince <tprince@computer.org>
Cc: toon@moene.indiv.nluug.nl, gcc-gnats@gcc.gnu.org,
        Youngjean Jung <yjjung@newton.me.berkeley.edu>
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
Date: Fri, 16 Nov 2001 10:59:40 -0800

 This is a multi-part message in MIME format.
 --------------050003040109000003040403
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Dear Mr. Tim Prince :
 
 I conducted many tests on the Endfile, Backspace commands. They don't 
 work in the following senses:
 
 1) Endfile command writes meaningless letters on the data file.
 2) Endfile, Backspace combination doesn't make a 'backspace job'.
 
 As for 1), I attached test4.f and s2.dat. I compiled test4.f with 
 g77-3.0.2. As you can see, s2.dat file has gabage letters.
 As for 2), I attached test3.f and s1.dat which I want in my data file. I 
 expect just one line data.  I generate s1.dat by compiling test3.f  with 
 g77-2.96. But I couldn't generate the s1.dat by compiling test3.f with 
 g77-3.0.2.
 
 Sincerely,
 
 Youngjean.
 
 Tim Prince wrote:
 
 >g77 3.1 20011031 has no apparent problem with this on i686-pc-cygwin.
 >----- Original Message -----
 >From: <toon@moene.indiv.nluug.nl>
 >To: <gcc-gnats@gcc.gnu.org>
 >Cc: "Youngjean Jung" <yjjung@newton.berkeley.edu>
 >Sent: Thursday, November 15, 2001 1:10 PM
 >Subject: fortran/4885: BACKSPACE example that doesn't work as of
 >gcc/g77-3.0.x
 >
 >
 >>>Number:         4885
 >>>Category:       fortran
 >>>Synopsis:       BACKSPACE example that doesn't work as of gcc/g77-3.0.x
 >>>Confidential:   no
 >>>Severity:       serious
 >>>Priority:       medium
 >>>Responsible:    unassigned
 >>>State:          open
 >>>Class:          sw-bug
 >>>Submitter-Id:   net
 >>>Arrival-Date:   Thu Nov 15 13:16:01 PST 2001
 >>>Closed-Date:
 >>>Last-Modified:
 >>>Originator:     Youngjean Jung
 >>>Release:        3.0 and higher
 >>>Organization:
 >>>Environment:
 >>>
 >>Debian GNU/Linux 2.2
 >>
 >>>Description:
 >>>
 >> The following code:
 >>
 >>      open(51,file='s1.dat',status='unknown',access='sequential')
 >>      do k=1,100
 >>      call plot(k)
 >>      end do
 >>      close(51)
 >>      end
 >>      subroutine plot(k)
 >>      j=0
 >>      do i=1,10
 >>        if(j.lt.5) then
 >>           j=j+1
 >>        else
 >>           backspace 51
 >>        endif
 >>        write(51,*) j, k
 >>      end do
 >>      end
 >>
 >>gives:
 >>
 >>$ ./a.out
 >>$ ./a.out
 >>backspace: end of file
 >>apparent state: unit 51 named s1.dat
 >>last format: list io
 >>lately writing direct formatted external IO
 >>Aborted
 >>
 >>[Note: for the failure to appear, the code has to be run
 >> a second time]
 >>
 >>>How-To-Repeat:
 >>>
 >>>Fix:
 >>>
 >>>Release-Note:
 >>>Audit-Trail:
 >>>Unformatted:
 >>>
 >
 >
 
 
 --------------050003040109000003040403
 Content-Type: text/plain;
  name="test3.f"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="test3.f"
 
       program test
 c
       implicit none
       integer  i,k    
 c
       do i=1,10
         open(1,file='s1.dat',status='unknown',access='sequential')
         do k=10,20
            write(1,*) i,k
            backspace 1
         end do
         close(1)
       end do
 c
       end
 c
 c
 
 
 --------------050003040109000003040403
 Content-Type: text/plain;
  name="test4.f"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="test4.f"
 
       program test
 c
       implicit none
       integer  i,k    
 c
       do i=1,10
         open(1,file='s2.dat',status='unknown',access='sequential')
         do k=10,20
            write(1,*) i,k
            endfile 1
            backspace 1
         end do
         close(1)
       end do
 c
       end
 c
 c
 
 
 --------------050003040109000003040403
 Content-Type: text/plain;
  name="s1.dat"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="s1.dat"
 
  10 20
 
 --------------050003040109000003040403
 Content-Type: application/octet-stream;
  name="s2.dat"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment;
  filename="s2.dat"
 
 IDEwIDEwCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 AAAAAAAAIDEwIDExCiAxMCAxMgogMTAgMTMKIDEwIDE0CiAxMCAxNQogMTAgMTYKIDEwIDE3
 CiAxMCAxOAogMTAgMTkKIDEwIDIwCg==
 --------------050003040109000003040403--
 


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

* Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
@ 2001-11-05  2:47 Youngjean Jung
  0 siblings, 0 replies; 14+ messages in thread
From: Youngjean Jung @ 2001-11-05  2:47 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: Youngjean Jung <yjjung@newton.me.berkeley.edu>
To: Tim Prince <tprince@computer.org>
Cc: toon@moene.indiv.nluug.nl, gcc-gnats@gcc.gnu.org,
        Youngjean Jung <yjjung@newton.me.berkeley.edu>
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
Date: Thu, 15 Nov 2001 20:06:02 -0800

 This is a multi-part message in MIME format.
 --------------070700080307020905040900
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Dear Mr. Tim Prince :
 
 I checked the data file which my test2.f made. Endfile command resolved 
 the I/O error, but unfortunatly data file is still wrong. Unnessary data 
 is written in the wrong place. Let me send you with my test2.f. Try 
 this. When I compiled test2.f by g77-2.96, no problem at all. But when I 
 compiled it
 by g77-3.0.2, it still gives me a wrong data file.
 
 Youngjean.
 
 Tim Prince wrote:
 
 >Doesn't this require ENDFILE 51 before BACKSPACE 51 ?  Sure, there have been
 >times when some implementation didn't care.
 >----- Original Message -----
 >From: <toon@moene.indiv.nluug.nl>
 >To: <gcc-gnats@gcc.gnu.org>
 >Cc: "Youngjean Jung" <yjjung@newton.berkeley.edu>
 >Sent: Thursday, November 15, 2001 1:10 PM
 >Subject: fortran/4885: BACKSPACE example that doesn't work as of
 >gcc/g77-3.0.x
 >
 >
 >>>Number:         4885
 >>>Category:       fortran
 >>>Synopsis:       BACKSPACE example that doesn't work as of gcc/g77-3.0.x
 >>>Confidential:   no
 >>>Severity:       serious
 >>>Priority:       medium
 >>>Responsible:    unassigned
 >>>State:          open
 >>>Class:          sw-bug
 >>>Submitter-Id:   net
 >>>Arrival-Date:   Thu Nov 15 13:16:01 PST 2001
 >>>Closed-Date:
 >>>Last-Modified:
 >>>Originator:     Youngjean Jung
 >>>Release:        3.0 and higher
 >>>Organization:
 >>>Environment:
 >>>
 >>Debian GNU/Linux 2.2
 >>
 >>>Description:
 >>>
 >> The following code:
 >>
 >>      open(51,file='s1.dat',status='unknown',access='sequential')
 >>      do k=1,100
 >>      call plot(k)
 >>      end do
 >>      close(51)
 >>      end
 >>      subroutine plot(k)
 >>      j=0
 >>      do i=1,10
 >>        if(j.lt.5) then
 >>           j=j+1
 >>        else
 >>           backspace 51
 >>        endif
 >>        write(51,*) j, k
 >>      end do
 >>      end
 >>
 >>gives:
 >>
 >>$ ./a.out
 >>$ ./a.out
 >>backspace: end of file
 >>apparent state: unit 51 named s1.dat
 >>last format: list io
 >>lately writing direct formatted external IO
 >>Aborted
 >>
 >>[Note: for the failure to appear, the code has to be run
 >> a second time]
 >>
 >>>How-To-Repeat:
 >>>
 >>>Fix:
 >>>
 >>>Release-Note:
 >>>Audit-Trail:
 >>>Unformatted:
 >>>
 >
 >
 
 
 --------------070700080307020905040900
 Content-Type: text/plain;
  name="test2.f"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="test2.f"
 
       program test
 c
       implicit none
       integer  i,k    
 c
       do i=1,10
         open(1,file='s1.dat',status='unknown',access='sequential')
         do k=1,10
            write(1,*) k
            endfile 1
            backspace 1
         end do
         close(1)
       end do
 c
       end
 c
 c
 
 
 --------------070700080307020905040900--
 


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

* Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
@ 2001-11-05  2:46 Tim Prince
  0 siblings, 0 replies; 14+ messages in thread
From: Tim Prince @ 2001-11-05  2:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: "Tim Prince" <tprince@computer.org>
To: <toon@moene.indiv.nluug.nl>,
	<gcc-gnats@gcc.gnu.org>
Cc: "Youngjean Jung" <yjjung@newton.berkeley.edu>
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
Date: Thu, 15 Nov 2001 19:49:38 -0800

 g77 3.1 20011031 has no apparent problem with this on i686-pc-cygwin.
 ----- Original Message -----
 From: <toon@moene.indiv.nluug.nl>
 To: <gcc-gnats@gcc.gnu.org>
 Cc: "Youngjean Jung" <yjjung@newton.berkeley.edu>
 Sent: Thursday, November 15, 2001 1:10 PM
 Subject: fortran/4885: BACKSPACE example that doesn't work as of
 gcc/g77-3.0.x
 
 
 >
 > >Number:         4885
 > >Category:       fortran
 > >Synopsis:       BACKSPACE example that doesn't work as of gcc/g77-3.0.x
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    unassigned
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Thu Nov 15 13:16:01 PST 2001
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Youngjean Jung
 > >Release:        3.0 and higher
 > >Organization:
 > >Environment:
 > Debian GNU/Linux 2.2
 > >Description:
 >  The following code:
 >
 >       open(51,file='s1.dat',status='unknown',access='sequential')
 >       do k=1,100
 >       call plot(k)
 >       end do
 >       close(51)
 >       end
 >       subroutine plot(k)
 >       j=0
 >       do i=1,10
 >         if(j.lt.5) then
 >            j=j+1
 >         else
 >            backspace 51
 >         endif
 >         write(51,*) j, k
 >       end do
 >       end
 >
 > gives:
 >
 > $ ./a.out
 > $ ./a.out
 > backspace: end of file
 > apparent state: unit 51 named s1.dat
 > last format: list io
 > lately writing direct formatted external IO
 > Aborted
 >
 > [Note: for the failure to appear, the code has to be run
 >  a second time]
 > >How-To-Repeat:
 >
 > >Fix:
 >
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 


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

* Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
@ 2001-11-05  2:45 Youngjean Jung
  0 siblings, 0 replies; 14+ messages in thread
From: Youngjean Jung @ 2001-11-05  2:45 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: Youngjean Jung <yjjung@newton.me.berkeley.edu>
To: Tim Prince <tprince@computer.org>
Cc: toon@moene.indiv.nluug.nl, gcc-gnats@gcc.gnu.org,
        Youngjean Jung <yjjung@newton.me.berkeley.edu>
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
Date: Thu, 15 Nov 2001 17:26:38 -0800

 Dear Mr. Tim Prince :
 
 Thank you so much for your help. It resolved the problem. Thank you so much.
 
 Best!
 
 Youngjean.
 
 Tim Prince wrote:
 
 >Doesn't this require ENDFILE 51 before BACKSPACE 51 ?  Sure, there have been
 >times when some implementation didn't care.
 >----- Original Message -----
 >From: <toon@moene.indiv.nluug.nl>
 >To: <gcc-gnats@gcc.gnu.org>
 >Cc: "Youngjean Jung" <yjjung@newton.berkeley.edu>
 >Sent: Thursday, November 15, 2001 1:10 PM
 >Subject: fortran/4885: BACKSPACE example that doesn't work as of
 >gcc/g77-3.0.x
 >
 >
 >>>Number:         4885
 >>>Category:       fortran
 >>>Synopsis:       BACKSPACE example that doesn't work as of gcc/g77-3.0.x
 >>>Confidential:   no
 >>>Severity:       serious
 >>>Priority:       medium
 >>>Responsible:    unassigned
 >>>State:          open
 >>>Class:          sw-bug
 >>>Submitter-Id:   net
 >>>Arrival-Date:   Thu Nov 15 13:16:01 PST 2001
 >>>Closed-Date:
 >>>Last-Modified:
 >>>Originator:     Youngjean Jung
 >>>Release:        3.0 and higher
 >>>Organization:
 >>>Environment:
 >>>
 >>Debian GNU/Linux 2.2
 >>
 >>>Description:
 >>>
 >> The following code:
 >>
 >>      open(51,file='s1.dat',status='unknown',access='sequential')
 >>      do k=1,100
 >>      call plot(k)
 >>      end do
 >>      close(51)
 >>      end
 >>      subroutine plot(k)
 >>      j=0
 >>      do i=1,10
 >>        if(j.lt.5) then
 >>           j=j+1
 >>        else
 >>           backspace 51
 >>        endif
 >>        write(51,*) j, k
 >>      end do
 >>      end
 >>
 >>gives:
 >>
 >>$ ./a.out
 >>$ ./a.out
 >>backspace: end of file
 >>apparent state: unit 51 named s1.dat
 >>last format: list io
 >>lately writing direct formatted external IO
 >>Aborted
 >>
 >>[Note: for the failure to appear, the code has to be run
 >> a second time]
 >>
 >>>How-To-Repeat:
 >>>
 >>>Fix:
 >>>
 >>>Release-Note:
 >>>Audit-Trail:
 >>>Unformatted:
 >>>
 >
 >
 
 


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

* Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
@ 2001-11-05  2:28 Tim Prince
  0 siblings, 0 replies; 14+ messages in thread
From: Tim Prince @ 2001-11-05  2:28 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR fortran/4885; it has been noted by GNATS.

From: "Tim Prince" <tprince@computer.org>
To: <toon@moene.indiv.nluug.nl>,
	<gcc-gnats@gcc.gnu.org>
Cc: "Youngjean Jung" <yjjung@newton.berkeley.edu>
Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
Date: Thu, 15 Nov 2001 17:12:07 -0800

 Doesn't this require ENDFILE 51 before BACKSPACE 51 ?  Sure, there have been
 times when some implementation didn't care.
 ----- Original Message -----
 From: <toon@moene.indiv.nluug.nl>
 To: <gcc-gnats@gcc.gnu.org>
 Cc: "Youngjean Jung" <yjjung@newton.berkeley.edu>
 Sent: Thursday, November 15, 2001 1:10 PM
 Subject: fortran/4885: BACKSPACE example that doesn't work as of
 gcc/g77-3.0.x
 
 
 >
 > >Number:         4885
 > >Category:       fortran
 > >Synopsis:       BACKSPACE example that doesn't work as of gcc/g77-3.0.x
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    unassigned
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Thu Nov 15 13:16:01 PST 2001
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Youngjean Jung
 > >Release:        3.0 and higher
 > >Organization:
 > >Environment:
 > Debian GNU/Linux 2.2
 > >Description:
 >  The following code:
 >
 >       open(51,file='s1.dat',status='unknown',access='sequential')
 >       do k=1,100
 >       call plot(k)
 >       end do
 >       close(51)
 >       end
 >       subroutine plot(k)
 >       j=0
 >       do i=1,10
 >         if(j.lt.5) then
 >            j=j+1
 >         else
 >            backspace 51
 >         endif
 >         write(51,*) j, k
 >       end do
 >       end
 >
 > gives:
 >
 > $ ./a.out
 > $ ./a.out
 > backspace: end of file
 > apparent state: unit 51 named s1.dat
 > last format: list io
 > lately writing direct formatted external IO
 > Aborted
 >
 > [Note: for the failure to appear, the code has to be run
 >  a second time]
 > >How-To-Repeat:
 >
 > >Fix:
 >
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 


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

* fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
@ 2001-11-04 10:56 toon
  0 siblings, 0 replies; 14+ messages in thread
From: toon @ 2001-11-04 10:56 UTC (permalink / raw)
  To: gcc-gnats; +Cc: Youngjean Jung


>Number:         4885
>Category:       fortran
>Synopsis:       BACKSPACE example that doesn't work as of gcc/g77-3.0.x
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 15 13:16:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Youngjean Jung
>Release:        3.0 and higher
>Organization:
>Environment:
Debian GNU/Linux 2.2
>Description:
 The following code:

      open(51,file='s1.dat',status='unknown',access='sequential')
      do k=1,100
      call plot(k)
      end do
      close(51)
      end
      subroutine plot(k)
      j=0
      do i=1,10
        if(j.lt.5) then
           j=j+1
        else
           backspace 51
        endif
        write(51,*) j, k
      end do
      end

gives:

$ ./a.out
$ ./a.out
backspace: end of file
apparent state: unit 51 named s1.dat
last format: list io
lately writing direct formatted external IO
Aborted

[Note: for the failure to appear, the code has to be run
 a second time]
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2001-12-03 23:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-05 14:11 fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x Toon Moene
  -- strict thread matches above, loose matches on Subject: below --
2001-12-03 15:56 toon
2001-12-03 15:54 toon
2001-11-08 19:26 Toon Moene
2001-11-06  4:46 Youngjean Jung
2001-11-05 16:27 Tim Prince
2001-11-05 15:39 Youngjean Jung
2001-11-05 15:08 Youngjean Jung
2001-11-05 14:01 Youngjean Jung
2001-11-05  2:47 Youngjean Jung
2001-11-05  2:46 Tim Prince
2001-11-05  2:45 Youngjean Jung
2001-11-05  2:28 Tim Prince
2001-11-04 10:56 toon

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