2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g77.dg / f77-edit-i-in.f
blob9040a4fcae256c555b9ab36593b59e5373cea7dd
1 C Test Fortran 77 I edit descriptor for input
2 C (ANSI X3.9-1978 Section 13.5.9.1)
4 C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
6 C { dg-do run }
8 integer i,j
9 character*10 buf
11 write(buf,'(A)') '1 -1'
13 read(buf,'(I1)') i
14 if ( i.ne.1 ) call abort()
16 read(buf,'(X,I1)') i
17 if ( i.ne.0 ) call abort()
19 read(buf,'(X,I1,X,I2)') i,j
20 if ( i.ne.0 .and. j.ne.-1 ) call abort()
22 end