f77-edit-s-out.f: Copy from g77.dg.

2004-07-09  David Billinghurst (David.Billinghurst@riotinto.com)

	* gfortran.dg/g77/f77-edit-s-out.f: Copy from g77.dg. XFAIL
	* gfortran.dg/g77/f77-edit-t-in.f: Likewise
	* gfortran.dg/g77/f77-edit-x-out.f: Likewise

From-SVN: r84326
This commit is contained in:
David Billinghurst 2004-07-08 23:36:52 +00:00 committed by David Billinghurst
parent 1555fc861a
commit e423d0f6c9
4 changed files with 69 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2004-07-09 David Billinghurst (David.Billinghurst@riotinto.com)
* gfortran.dg/g77/f77-edit-s-out.f: Copy from g77.dg. XFAIL
* gfortran.dg/g77/f77-edit-t-in.f: Likewise
* gfortran.dg/g77/f77-edit-x-out.f: Likewise
2004-07-09 David Billinghurst (David.Billinghurst@riotinto.com)
* gfortran.dg/g77/7388.f: Copy from g77.dg

View File

@ -0,0 +1,20 @@
C Test Fortran 77 S, SS and SP edit descriptors
C (ANSI X3.9-1978 Section 13.5.6)
C
C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
C
C { dg-do run }
C ( dg-output "^" }
10 format(SP,I3,1X,SS,I3)
20 format(SP,I3,1X,SS,I3,SP,I3)
30 format(SP,I3,1X,SS,I3,S,I3)
40 format(SP,I3)
50 format(SP,I2)
write(*,10) 10, 20 ! { dg-output "\\+10 20(\n|\r\n|\r)" }
write(*,20) 10, 20, 30 ! { dg-output "\\+10 20\\+30(\n|\r\n|\r)" }
write(*,30) 10, 20, 30 ! { dg-output "\\+10 20 30(\n|\r\n|\r)" }
write(*,40) 0 ! { dg-output " \\+0(\n|\r\n|\r)" }
C 15.5.9 - Note 5: When SP editing is in effect, the plus sign is not optional
write(*,50) 11 ! { dg-output "\\*\\*(\n|\r\n|\r)" }
C { dg-output "\$" {xfail *-*-*} } gfortran PR 16434
end

View File

@ -0,0 +1,31 @@
C Test Fortran 77 T edit descriptor for input
C (ANSI X3.9-1978 Section 13.5.3.2)
C
C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
C
C { dg-do run {xfail *-*-*} } gfortran PR 16436
integer i,j
real a,b,c,d,e
character*32 in
in = '1234 8'
read(in,'(T3,I1)') i
if ( i.ne.3 ) call abort()
read(in,'(5X,TL4,I2)') i
if ( i.ne.23 ) call abort()
read(in,'(3X,I1,TR3,I1)') i,j
if ( i.ne.4 ) call abort()
if ( j.ne.8 ) call abort()
in = ' 1.5 -12.62 348.75 1.0E-6'
100 format(F6.0,TL6,I4,1X,I1,8X,I5,F3.0,T10,F5.0,T17,F6.0,TR2,F6.0)
read(in,100) a,i,j,k,b,c,d,e
if ( abs(a-1.5).gt.1.0e-5 ) call abort()
if ( i.ne.1 ) call abort()
if ( j.ne.5 ) call abort()
if ( k.ne.348 ) call abort()
if ( abs(b-0.75).gt.1.0e-5 ) call abort()
if ( abs(c-12.62).gt.1.0e-5 ) call abort()
if ( abs(d-348.75).gt.1.0e-4 ) call abort()
if ( abs(e-1.0e-6).gt.1.0e-11 ) call abort()
end

View File

@ -0,0 +1,12 @@
C Test Fortran 77 X descriptor
C (ANSI X3.9-1978 Section 13.5.3.2)
C
C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
C
C { dg-do run }
C ( dg-output "^" }
write(*,'(I1,1X,I1,2X,I1)') 1,2,3 ! { dg-output "1 2 3(\n|\r\n|\r)" }
C Section 13.5.3 explains why there are no trailing blanks
write(*,'(I1,1X,I1,2X,I1,3X)') 1,2,3 ! { dg-output "1 2 3(\n|\r\n|\r)" }
C { dg-output "\$" {xfail *-*-*} } gfortran PR 16435
end