From e423d0f6c9acf9f02ac4c5e64e207c49351d4173 Mon Sep 17 00:00:00 2001 From: David Billinghurst Date: Thu, 8 Jul 2004 23:36:52 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 6 ++++ .../gfortran.dg/g77/f77-edit-s-out.f | 20 ++++++++++++ gcc/testsuite/gfortran.dg/g77/f77-edit-t-in.f | 31 +++++++++++++++++++ .../gfortran.dg/g77/f77-edit-x-out.f | 12 +++++++ 4 files changed, 69 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/g77/f77-edit-s-out.f create mode 100644 gcc/testsuite/gfortran.dg/g77/f77-edit-t-in.f create mode 100644 gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 642e0be4efd..a6ac8bd2b3b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/gfortran.dg/g77/f77-edit-s-out.f b/gcc/testsuite/gfortran.dg/g77/f77-edit-s-out.f new file mode 100644 index 00000000000..b5205a8bf53 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/g77/f77-edit-s-out.f @@ -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 +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 diff --git a/gcc/testsuite/gfortran.dg/g77/f77-edit-t-in.f b/gcc/testsuite/gfortran.dg/g77/f77-edit-t-in.f new file mode 100644 index 00000000000..6abd1967b89 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/g77/f77-edit-t-in.f @@ -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 +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 diff --git a/gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f b/gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f new file mode 100644 index 00000000000..400b85b6bf1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f @@ -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 +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 -- 2.30.2