When finalizing I/O transfer, set current_record to 0 before returning.
PR libfortran/40714 Co-Authored-By: Jerry DeLisle <jvdelisle@gcc.gnu.org> From-SVN: r149757
This commit is contained in:
parent
23b1a789fd
commit
217c4f5393
|
@ -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>
|
2009-07-12 Tobias Burnus <burnus@net-b.de>
|
||||||
|
|
||||||
PR libfortran/22423
|
PR libfortran/22423
|
||||||
|
|
|
@ -3103,7 +3103,11 @@ finalize_transfer (st_parameter_dt *dtp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((dtp->common.flags & IOPARM_LIBRETURN_MASK) != IOPARM_LIBRETURN_OK)
|
if ((dtp->common.flags & IOPARM_LIBRETURN_MASK) != IOPARM_LIBRETURN_OK)
|
||||||
|
{
|
||||||
|
if (dtp->u.p.current_unit && current_mode (dtp) == UNFORMATTED_SEQUENTIAL)
|
||||||
|
dtp->u.p.current_unit->current_record = 0;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((dtp->u.p.ionml != NULL)
|
if ((dtp->u.p.ionml != NULL)
|
||||||
&& (cf & IOPARM_DT_HAS_NAMELIST_NAME) != 0)
|
&& (cf & IOPARM_DT_HAS_NAMELIST_NAME) != 0)
|
||||||
|
|
Loading…
Reference in New Issue