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
+2008-01-26 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR libfofortran/34887
+ * gfortran.dg/x_slash_2.f: New test.
+
2008-01-26 Richard Guenther <rguenther@suse.de>
PR c++/34235
--- /dev/null
+! { dg-do run }
+! PR 34887 - reverse tabs followed by a slash used to confuse I/O.
+ program main
+ character(len=2) :: b, a
+ open(10,form="formatted")
+ write (10,'(3X, A, T1, A,/)') 'aa', 'bb'
+ rewind(10)
+ read (10,'(A2,1X,A2)') b,a
+ if (a /= 'aa' .or. b /= 'bb') call abort
+ close(10,status="delete")
+ end
+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
}
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