diff options
author | tkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-01-26 15:22:59 +0000 |
---|---|---|
committer | tkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-01-26 15:22:59 +0000 |
commit | d2e60c9efbe40341a2199078a02c319cdbc811d4 (patch) | |
tree | fc4b24390f3439ee4e597fbe0adfce8a6dc647d5 /libgfortran | |
parent | e03d813feff363efe1ac4489d026f934b41a6582 (diff) | |
download | gcc-d2e60c9efbe40341a2199078a02c319cdbc811d4.tar.gz |
2008-01-26 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfofortran/34887
* io/transfer.c (next_record_w): Always move to the farthest
position when completing the record (also when we are
processing a slash edit descriptor).
2008-01-26 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfofortran/34887
* gfortran.dg/x_slash_2.f: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131864 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 7 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 23 |
2 files changed, 17 insertions, 13 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 1c9148c13d0..a83ee24daae 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2008-01-26 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR libfofortran/34887 + * io/transfer.c (next_record_w): Always move to the farthest + position when completing the record (also when we are + processing a slash edit descriptor). + 2008-01-25 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/34876 diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index e94eb7431e6..52c6314349d 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -2573,21 +2573,18 @@ next_record_w (st_parameter_dt *dtp, int done) } else { - /* If this is the last call to next_record move to the farthest - position reached in preparation for completing the record. - (for file unit) */ - if (done) - { - m = dtp->u.p.current_unit->recl - - dtp->u.p.current_unit->bytes_left; - if (max_pos > m) - { - length = (int) (max_pos - m); - p = salloc_w (dtp->u.p.current_unit->s, &length); - } - } size_t len; const char crlf[] = "\r\n"; + + /* Move to the farthest position reached in preparation for + completing the record. (for file unit) */ + m = dtp->u.p.current_unit->recl - + dtp->u.p.current_unit->bytes_left; + if (max_pos > m) + { + length = (int) (max_pos - m); + p = salloc_w (dtp->u.p.current_unit->s, &length); + } #ifdef HAVE_CRLF len = 2; #else |