Commit 8d917a24 by Jerry DeLisle

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
parent 090b4ea8
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
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment