| 1 |
!{ dg-do run } |
| 2 |
! PR26423 Large file I/O error related to buffering |
| 3 |
! Test case derived from case by Dale Ranta. |
| 4 |
! Submitted by Jerry DeLisle <[email protected]> |
| 5 |
integer :: a(3000) , b(2048) |
| 6 |
a=3 |
| 7 |
b=5 |
| 8 |
a(1) = 1 |
| 9 |
a(3000)=1234 |
| 10 |
write(2) a |
| 11 |
b(1) = 2 |
| 12 |
b(2048) = 5678 |
| 13 |
write(2) b |
| 14 |
rewind 2 |
| 15 |
read(2) a |
| 16 |
read(2) b |
| 17 |
if (a(1).ne.1) STOP 1 |
| 18 |
if (a(2).ne.3) STOP 2 |
| 19 |
if (b(1).ne.2) STOP 3 |
| 20 |
if (b(2).ne.5) STOP 4 |
| 21 |
if (a(3000).ne.1234) STOP 5 |
| 22 |
if (b(2048).ne.5678) STOP 6 |
| 23 |
close(2, status='delete') |
| 24 |
end |