| 1 |
! { dg-options "" } |
| 2 |
! { dg-do run } |
| 3 |
! pr24699, handle end-of-record on READ with T format |
| 4 |
! test contributed by Jerry DeLisle <[email protected]> |
| 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." |
| 10 |
rewind(11) |
| 11 |
|
| 12 |
read (11, '(a040,t1,040a)', end = 999) foost1 , foost2 |
| 13 |
if (foost1.ne.foost2) STOP 1 |
| 14 |
|
| 15 |
read (11, '(a032,t2,a032,t3,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 |
| 19 |
|
| 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 |
| 23 |
goto 1000 |
| 24 |
999 STOP 7 |
| 25 |
1000 continue |
| 26 |
close(11) |
| 27 |
end |