This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

DEFAULT_RECL too low?


Hi all,

I'm working on PR libfortran/20257 (writing a array larger than, for example, 700 reals with default format, fails with runtime error).

When a unit is opened with no RECL parameter, it is set to DEFAULT_RECL, which is hard-coded in libgfortran/io/io.h to be 10000). Unfortunately, when we issue a simple list-directed write statement, such as in:

 real(kind=4) :: array(700)
 array(:) = 0
 open (10, file='foo')
 write(10,*) array
end

The length needed to output array in the default format is greater than 10000, thus throwing an I/O error ("End of record"). This is of course a Bad Thing. I am not sure I see a reason for setting so low a DEFAULT_RECL, so I am asking: is there a reason that I don't see that would prevent us from setting the recl value of newly-opened units much higher?

FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]