diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2007-03-26 03:23:15 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2007-03-26 03:23:15 +0000 |
commit | beb6a65e7573a9178764a1844d052cdeeb529322 (patch) | |
tree | 7005f5c75c7f6dbaca78f2f73008ed5b96700d1d /libgfortran/io/open.c | |
parent | 75b63e8b5b4a8b5bd7621edb8a4e2eefcc186981 (diff) | |
download | gcc-beb6a65e7573a9178764a1844d052cdeeb529322.zip gcc-beb6a65e7573a9178764a1844d052cdeeb529322.tar.gz gcc-beb6a65e7573a9178764a1844d052cdeeb529322.tar.bz2 |
re PR fortran/31199 (write with "t1" + nonadvancing transfer format gives wrong output)
2007-03-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/31199
*io/io.h: Add saved_pos to gfc_unit structure.
*io/open.c (new_unit): Initialize saved_pos.
*io/transfer.c (data_transfer_init): Set max_pos to value in saved_pos.
(next_record_w): Fix whitespace.
(finalze_transfer): Calculate max_pos for ADVANCE="no" and save it for
later use. If not ADVANCE="no" set saved_pos to zero.
From-SVN: r123205
Diffstat (limited to 'libgfortran/io/open.c')
-rw-r--r-- | libgfortran/io/open.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c index 8c6f9fb..44ff69d 100644 --- a/libgfortran/io/open.c +++ b/libgfortran/io/open.c @@ -423,6 +423,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags * flags) u->mode = READING; u->maxrec = 0; u->bytes_left = 0; + u->saved_pos = 0; if (flags->position == POSITION_APPEND) { |