re PR fortran/40714 (Fortran runtime error: Invalid argument)

2009-07-19  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.
	* io/open.c: Fix spelling in comment.

Co-Authored-By: Jerry DeLisle <jvdelisle@gcc.gnu.org>

From-SVN: r149795
This commit is contained in:
Janne Blomqvist 2009-07-20 02:10:22 +03:00 committed by Jerry DeLisle
parent 30dc44715f
commit c7b55ab1c6
3 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2009-07-19 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.
* io/open.c: Fix spelling in comment.
2009-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40576

View File

@ -775,7 +775,7 @@ st_open (st_parameter_open *opp)
find_option (&opp->common, opp->status, opp->status_len,
status_opt, "Bad STATUS parameter in OPEN statement");
/* First, we check wether the convert flag has been set via environment
/* First, we check whether the convert flag has been set via environment
variable. This overrides the convert tag in the open statement. */
conv = get_unformatted_convert (opp->common.unit);

View File

@ -3104,7 +3104,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)