This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[Patch, libfortran, 4.4.1, 4.5] PR 40714 I/O regression
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 17 Jul 2009 22:44:22 +0300
- Subject: [Patch, libfortran, 4.4.1, 4.5] PR 40714 I/O regression
Hi,
the attached patch fixes PR 40714, which is a regression on trunk and
4.4.1 (4.4.0 works). Committed to trunk after approval by Jerry on
IRC, will commit to 4.4 pending RM approval (Jerry has contacted Jakub
about this).
Index: ChangeLog
===================================================================
--- ChangeLog (revision 149756)
+++ ChangeLog (working copy)
@@ -1,3 +1,10 @@
+2009-07-17 Janne Blomqvist <jb@gcc.gnu.org>
+ Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/40714
+ * io/transfer.c (finalize_transfer): Set current_record to 0
+ before returning in case of error.
+
2009-07-12 Tobias Burnus <burnus@net-b.de>
PR libfortran/22423
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)
--
Janne Blomqvist