[patch, libfortran][4.4.1 Regression] PR40714 Incorrect I/O behavior
Jerry DeLisle
jvdelisle@verizon.net
Sat Jul 18 17:25:00 GMT 2009
The following patch has been committed to trunk.
I would like permission to commit t0 4.4.1 before release.
This fixes a problem handling certain error conditions. We can show that the bug
can produce very large files with an empty write statement. The patch itself is
simple and un-intrusive.
OK to commit to 4.4.1 Jakub?
Regards,
Jerry
Index: io/transfer.c
===================================================================
--- io/transfer.c (revision 149756)
+++ io/transfer.c (working copy)
@@ -3103,7 +3103,11 @@ finalize_transfer (st_parameter_dt *dtp)
}
if ((dtp->common.flags & IOPARM_LIBRETURN_MASK) != IOPARM_LIBRETURN_OK)
- return;
+ {
+ if (dtp->u.p.current_unit && current_mode (dtp) ==
UNFORMATTED_SEQUENTIAL)
+ dtp->u.p.current_unit->current_record = 0;
+ return;
+ }
if ((dtp->u.p.ionml != NULL)
&& (cf & IOPARM_DT_HAS_NAMELIST_NAME) != 0)
More information about the Gcc-patches
mailing list