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
This commit is contained in:
parent
965eec1676
commit
2571ba2bf0
8 changed files with 62 additions and 10 deletions
|
@ -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".
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
31
gcc/testsuite/gfortran.dg/arrayio_6.f90
Normal file
31
gcc/testsuite/gfortran.dg/arrayio_6.f90
Normal file
|
@ -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
|
13
gcc/testsuite/gfortran.dg/arrayio_7.f90
Normal file
13
gcc/testsuite/gfortran.dg/arrayio_7.f90
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue