From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19695 invoked by alias); 16 Nov 2001 20:56:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 19677 invoked by uid 71); 16 Nov 2001 20:56:01 -0000 Date: Mon, 05 Nov 2001 15:08:00 -0000 Message-ID: <20011116205601.19676.qmail@sourceware.cygnus.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Youngjean Jung Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x Reply-To: Youngjean Jung X-SW-Source: 2001-11/txt/msg00144.txt.bz2 List-Id: The following reply was made to PR fortran/4885; it has been noted by GNATS. From: Youngjean Jung To: Tim Prince Cc: toon@moene.indiv.nluug.nl, gcc-gnats@gcc.gnu.org, Youngjean Jung 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: >To: >Cc: "Youngjean Jung" >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--