+2005-09-03 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.dg/fmt_t_1.f90: New test.
+
2005-09-03 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/23454
--- /dev/null
+! { dg-do run }
+ integer nrow, vec(15)
+ open (10, status="scratch")
+ write (10, fmt='(a)') '001 1 2 3 4 5 6'
+ write (10, fmt='(a)') '000000 7 8 9101112'
+ write (10, fmt='(a)') '000000131415'
+ rewind (10)
+ read (10, fmt='(i6, (t7, 6i2))') nrow, (vec(i), i=1,15)
+ close (10)
+ if (nrow.ne.1) call abort
+ if (any (vec.ne.(/1,2,3,4,5,6,7,8,9,10,11,12,13,14,15/))) call abort
+ end
+2005-09-03 Jakub Jelinek <jakub@redhat.com>
+
+ * io/read.c (read_x): Take int argument instead of fnode * and
+ digging the N from F->u.n.
+ * io/io.h (read_x): Adjust prototype.
+ * io/transfer.c (formatted_transfer): Adjust callers. Don't clobber
+ f->u.n for FMT_T.
+
2005-09-02 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* io/unix.c (stream_ttyname): Protect use of ttyname by
extern void read_l (fnode *, char *, int);
internal_proto(read_l);
-extern void read_x (fnode *);
+extern void read_x (int);
internal_proto(read_x);
extern void read_radix (fnode *, char *, int, int);
* and never look at it. */
void
-read_x (fnode * f)
+read_x (int n)
{
- int n;
-
- n = f->u.n;
-
if ((current_unit->flags.pad == PAD_NO || is_internal_unit ())
&& current_unit->bytes_left < n)
n = current_unit->bytes_left;
/* Writes occur just before the switch on f->format, above, so that
trailing blanks are suppressed. */
if (g.mode == READING)
- read_x (f);
+ read_x (f->u.n);
break;
if (g.mode == READING)
{
if (skips > 0)
- {
- f->u.n = skips;
- read_x (f);
- }
+ read_x (skips);
if (skips < 0)
{
move_pos_offset (current_unit->s, skips);