This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/29568] implement unformatted files with subrecords (Intel style)
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Nov 2006 21:05:26 -0000
- Subject: [Bug libfortran/29568] implement unformatted files with subrecords (Intel style)
- References: <bug-29568-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from tkoenig at gcc dot gnu dot org 2006-11-15 21:05 -------
(In reply to comment #7)
> Unfortunately, there was one thinko in the approach I took
> with reading. Even for subrecords, we need to be
> able to spot if we exceed recl.
>
> Back to the drawing board...
Actually, we currently don't check wether we exceed recl on
unformatted write or read, and neither ifort or g77 do so:
$ cat recl.f
program main
character*10 a,b
open (9, file="foo.dat", form="unformatted",
& access="sequential", recl=80)
write (9) '1234567890','1234567890'
close (9)
open (10, file="foo.dat", form="unformatted",
& access="sequential",recl=10)
read (10) a,b
print *,a,b
end
$ gfortran recl.f && ./a.out
12345678901234567890
$ ifort recl.f && ./a.out
12345678901234567890
$ g77 recl.f && ./a.out
12345678901234567890
If there's a bug to fix, it doesn't concern subrecords, at least.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29568