3 ! pr24699, handle end-of-record on READ with T format
4 ! test contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
5 character*132 :: foost1
, foost2
, foost3
6 open (11, status
="scratch", action
="readwrite")
7 write(11, '(a)') "ab cdefghijkl mnop qrst"
8 write(11, '(a)') "123456789 123456789 123456789"
9 write(11, '(a)') " Now is the time for all good."
12 read (11, '(a040,t1,040a)', end = 999) foost1
, foost2
13 if (foost1
.ne
.foost2
) STOP 1
15 read (11, '(a032,t2,a032t3,a032)', end = 999) foost1
, foost2
, foost3
16 if (foost1(1:32).ne
."123456789 123456789 123456789 ") STOP 2
17 if (foost2(1:32).ne
."23456789 123456789 123456789 ") STOP 3
18 if (foost3(1:32).ne
."3456789 123456789 123456789 ") STOP 4
20 read (11, '(a017,t1,a0017)', end = 999) foost1
, foost2
21 if (foost1
.ne
.foost2
) STOP 5
22 if (foost2(1:17).ne
." Now is the time ") STOP 6