This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
- From: Youngjean Jung <yjjung at newton dot me dot berkeley dot edu>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 16 Nov 2001 19:06:01 -0000
- Subject: Re: fortran/4885: BACKSPACE example that doesn't work as of gcc/g77-3.0.x
- Reply-to: Youngjean Jung <yjjung at newton dot me dot berkeley dot edu>
[Get raw message]
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--