re PR fortran/32678 ([4.2, 4.1]GFortan works incorrectly when writing with FORMAT Tx)

2007-07-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/32678
	* io/transfer.c (formatted_transfer_scalar): Don't allow pending_spaces
	to go negative.

From-SVN: r126473
This commit is contained in:
Jerry DeLisle 2007-07-09 00:15:15 +00:00
parent 090b4ea8ea
commit 8d917a24a7
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-07-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/32678
* io/transfer.c (formatted_transfer_scalar): Don't allow pending_spaces
to go negative.
2007-07-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/32217

View File

@ -1213,6 +1213,8 @@ formatted_transfer_scalar (st_parameter_dt *dtp, bt type, void *p, int len,
dtp->u.p.skips = dtp->u.p.skips + pos - bytes_used;
dtp->u.p.pending_spaces = dtp->u.p.pending_spaces
+ pos - dtp->u.p.max_pos;
dtp->u.p.pending_spaces = dtp->u.p.pending_spaces < 0
? 0 : dtp->u.p.pending_spaces;
if (dtp->u.p.skips == 0)
break;