[Patch, libgfortran] FIX PR26509 Catch EOR on DIRECT access write
Jerry DeLisle
jvdelisle@verizon.net
Mon Mar 13 04:34:00 GMT 2006
:ADDPATCH fortran:
The attached patch adds a new error to gfortran. When an attempt is made to
write larger then the record length on a direct access file, the EOR could not
be caught because ERROR_END and ERROR_EOR are not allowed with direct access.
The new error allows the error machinery to default to ERR which is allowed to
be specified in the direct access WRITE statement.
Note: The attached test case tests both catching the error and jumping past an
abort as well as not catching it and getting the error message.
Tested. OK for trunk and 4.1.1?
Regards,
Jerry
2006-03-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/26509
* libgfortran.h: Add ERROR_DIRECT_EOR.
* runtime/error.c (translate_error): Add translation for new error.
* io/transfer.c (write_buf): Add check for EOR when mode is
direct access.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr26509.diff
Type: text/x-patch
Size: 1553 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060313/95295abd/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: write_direct_eor.f90
Type: application/x-extension-f90
Size: 491 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060313/95295abd/attachment-0001.bin>
More information about the Fortran
mailing list