aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Billinghurst <David.Billinghurst@riotinto.com>2004-07-08 23:36:52 +0000
committerDavid Billinghurst <billingd@gcc.gnu.org>2004-07-08 23:36:52 +0000
commite423d0f6c9acf9f02ac4c5e64e207c49351d4173 (patch)
treeb98426ae8251e32c362065f8036608329938d233 /gcc
parent1555fc861a1ecde35099efb661c48d04ef5ef5ab (diff)
downloadgcc-e423d0f6c9acf9f02ac4c5e64e207c49351d4173.zip
gcc-e423d0f6c9acf9f02ac4c5e64e207c49351d4173.tar.gz
gcc-e423d0f6c9acf9f02ac4c5e64e207c49351d4173.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gfortran.dg/g77/f77-edit-s-out.f20
-rw-r--r--gcc/testsuite/gfortran.dg/g77/f77-edit-t-in.f31
-rw-r--r--gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f12
4 files changed, 69 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 642e0be..a6ac8bd 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,11 @@
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
* gfortran.dg/g77/f77-edit-i-out.f: Likewise
* gfortran.dg/g77/f77-edit-apostrophe-out.f: Likewise
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 0000000..b5205a8
--- /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 <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
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 0000000..6abd196
--- /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 <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
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 0000000..400b85b6
--- /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 <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