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

Reply via email to