aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@verizon.net>2005-10-25 01:45:02 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2005-10-25 01:45:02 +0000
commit2571ba2bf0abdbdca3de940e39f48ec42708db3e (patch)
tree42f5db4ced9de9f41805c044a359d37326f89381
parent965eec1676035e748a44bc0069f1b046c40a470c (diff)
downloadgcc-2571ba2bf0abdbdca3de940e39f48ec42708db3e.zip
gcc-2571ba2bf0abdbdca3de940e39f48ec42708db3e.tar.gz
gcc-2571ba2bf0abdbdca3de940e39f48ec42708db3e.tar.bz2
re PR libfortran/24224 (Generalized internal array IO not implemented.)
2005-10-24 Jerry DeLisle <jvdelisle@verizon.net> PR libgfortran/24224 * gfortran.dg/arrayio_1.f90: Update attribution. * gfortran.dg/arrayio_2.f90: Update attribution. * gfortran.dg/arrayio_3.f90: Update attribution. * gfortran.dg/arrayio_4.f90: Update test conditions. * gfortran.dg/arrayio_5.f90: Update attribution. * gfortran.dg/arrayio_6.f90: New test. * gfortran.dg/arrayio_7.f90: New test. sle <jvdelisle@verizon.net> From-SVN: r105879
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gfortran.dg/arrayio_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/arrayio_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/arrayio_3.f904
-rw-r--r--gcc/testsuite/gfortran.dg/arrayio_4.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/arrayio_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/arrayio_6.f9031
-rw-r--r--gcc/testsuite/gfortran.dg/arrayio_7.f9013
8 files changed, 62 insertions, 10 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dd4652a..b398d19 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-24 Jerry DeLisle <jvdelisle@verizon.net>
+
+ PR libgfortran/24224
+ * gfortran.dg/arrayio_4.f90: Update test conditions.
+ * gfortran.dg/arrayio_6.f90: New test.
+ * gfortran.dg/arrayio_7.f90: New test.
+
2005-10-24 Zdenek Dvorak <dvorakz@suse.cz>
* gcc.dg/tree-ssa/loop-9.c: Prevent matching "leave".
diff --git a/gcc/testsuite/gfortran.dg/arrayio_1.f90 b/gcc/testsuite/gfortran.dg/arrayio_1.f90
index 1941b45..2d4cf31 100644
--- a/gcc/testsuite/gfortran.dg/arrayio_1.f90
+++ b/gcc/testsuite/gfortran.dg/arrayio_1.f90
@@ -1,5 +1,6 @@
! { dg-do run }
! PR 21875 : Test formatted input/output to/from character arrays.
+! Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
program arrayio_1
implicit none
integer :: i(6),j,k
diff --git a/gcc/testsuite/gfortran.dg/arrayio_2.f90 b/gcc/testsuite/gfortran.dg/arrayio_2.f90
index 934f65c..96fd18f 100644
--- a/gcc/testsuite/gfortran.dg/arrayio_2.f90
+++ b/gcc/testsuite/gfortran.dg/arrayio_2.f90
@@ -1,7 +1,7 @@
! { dg-do run }
! PR 21875 : Test formatted input/output to/from character arrays.
! This test ckecks proper positioning and padding with trailing blanks
-! after write operations
+! after write operations. Contributed by Paul Thomas.
program arrayio_2
implicit none
integer :: i=2
diff --git a/gcc/testsuite/gfortran.dg/arrayio_3.f90 b/gcc/testsuite/gfortran.dg/arrayio_3.f90
index a3164ac..eb872eb 100644
--- a/gcc/testsuite/gfortran.dg/arrayio_3.f90
+++ b/gcc/testsuite/gfortran.dg/arrayio_3.f90
@@ -1,7 +1,7 @@
! { dg-do run }
! PR 21875 : Test formatted input/output to/from character arrays.
-! This test deliberately exceeds the record length in a write and
-! verifies the error message.
+! This test deliberately exceeds the record length in a write and verifies
+! the error message. Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
program arrayio_3
implicit none
integer :: i(6),j,ierr
diff --git a/gcc/testsuite/gfortran.dg/arrayio_4.f90 b/gcc/testsuite/gfortran.dg/arrayio_4.f90
index 3b4e535..6236d2d 100644
--- a/gcc/testsuite/gfortran.dg/arrayio_4.f90
+++ b/gcc/testsuite/gfortran.dg/arrayio_4.f90
@@ -1,21 +1,20 @@
! { dg-do run }
-! PR 21875 : Test formatted input/output to/from character arrays.
-! This test checks the error checking for non-contiguous character
-! arrays which are not allowed by standard. Error 13 is
-! ERROR_ARRAY_STRIDE in libgfortran.h
+! PR 24244 : Test formatted input/output to/from character arrays.
+! This test checks array I/O with strides other than 1.
+! Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
program arrayio_4
implicit none
integer :: ierr
character(12) :: r(2,3,4) = '0123456789AB'
write(r(::2,:,::1),'(i5)', iostat=ierr) 1,2,3,4,5
- if (ierr.ne.13) call abort()
+ if (ierr.ne.0) call abort()
write(r(:,:,::2),'(i5)', iostat=ierr) 1,2,3,4,5
- if (ierr.ne.13) call abort()
+ if (ierr.ne.0) call abort()
write(r(::1,::2,::1),'(i5)', iostat=ierr) 1,2,3,4,5
- if (ierr.ne.13) call abort()
+ if (ierr.ne.0) call abort()
write(r(::1,::1,::1),'(i5)', iostat=ierr) 1,2,3,4,5
if (ierr.ne.0) call abort()
diff --git a/gcc/testsuite/gfortran.dg/arrayio_5.f90 b/gcc/testsuite/gfortran.dg/arrayio_5.f90
index edaa915..cb06203 100644
--- a/gcc/testsuite/gfortran.dg/arrayio_5.f90
+++ b/gcc/testsuite/gfortran.dg/arrayio_5.f90
@@ -1,6 +1,7 @@
! { dg-do run }
! PR 21875 : Test formatted input/output to/from character arrays.
! This test checks the error checking for end of file condition.
+! Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
program arrayio_5
implicit none
integer :: i,ierr
diff --git a/gcc/testsuite/gfortran.dg/arrayio_6.f90 b/gcc/testsuite/gfortran.dg/arrayio_6.f90
new file mode 100644
index 0000000..d9343ab
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/arrayio_6.f90
@@ -0,0 +1,31 @@
+! { dg-do run }
+! PR24224 Test formatted input/output to/from character arrays with strides
+! other than 1. Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
+ program arrayio_6
+ implicit none
+ integer :: i(3),j,k(3)
+ character(12) :: r(4,4,4) = '0123456789AB'
+ character(12) :: s(64)
+ equivalence(r,s)
+
+ i = (/(j,j=1,3)/)
+ write(r(1:4:2,2:4:1,3:4:2),'(3(2x,i4/)/3(3x,i6/))') i
+
+ if (s(36).ne.'0123456789AB') call abort()
+ if (s(37).ne.' 1 ') call abort()
+ if (s(38).ne.'0123456789AB') call abort()
+ if (s(39).ne.' 2 ') call abort()
+ if (s(40).ne.'0123456789AB') call abort()
+ if (s(41).ne.' 3 ') call abort()
+ if (s(42).ne.'0123456789AB') call abort()
+ if (s(43).ne.' ') call abort()
+ if (s(44).ne.'0123456789AB') call abort()
+ if (s(45).ne.' ') call abort()
+ if (s(46).ne.'0123456789AB') call abort()
+
+ k = i
+ i = 0
+ read(r(1:4:2,2:4:1,3:4:2),'(3(2x,i4/)/3(3x,i6/))') i
+ if (any(i.ne.k)) call abort()
+
+ end program arrayio_6
diff --git a/gcc/testsuite/gfortran.dg/arrayio_7.f90 b/gcc/testsuite/gfortran.dg/arrayio_7.f90
new file mode 100644
index 0000000..6958176
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/arrayio_7.f90
@@ -0,0 +1,13 @@
+! { dg-do run }
+! PR24224 Test formatted input/output to/from character arrays with strides
+! other than 1. Test that reading stops at the end of the current record.
+! Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
+program arrayio_7
+ character*4, dimension(8) :: abuf = (/"0123","4567","89AB","CDEF", &
+ "0123","4567","89AB","CDEF"/)
+ character*4, dimension(2,4) :: buf
+ character*8 :: a
+ equivalence (buf,abuf)
+ read(buf(2, 1:3:2), '(a8)') a
+ if (a.ne."4567") call abort()
+end program arrayio_7