hppa64: Fix fmt_f_default_field_width_3.f90 and fmt_g_default_field_width_3.f90
[official-gcc.git] / gcc / testsuite / gfortran.dg / advance_5.f90
blobcd2c92a4f9770f0c4237f05488c0de2e56ed49e2
1 ! { dg-do run }
2 ! PR31207 Last record truncated for read after short write.
3 character(len=20) :: b
4 ! write something no advance
5 open(10,file="fort.10",position="rewind")
6 write(10, '(a,t1,a)',advance='no') 'xxxxxx', 'abc'
7 close(10)
8 ! append some data
9 open(10,file="fort.10",position="append")
10 write(10, '(a)') 'def'
11 close(10)
12 ! check what is in the first record
13 open(10,file="fort.10",position="rewind")
14 read(10,'(a)') b
15 close(10, status="delete")
16 if (b.ne."abcxxx") STOP 1
17 end