OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [arrayio_6.f90] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
! { dg-do run }
! { dg-do run }
! PR24224 Test formatted input/output to/from character arrays with strides
! PR24224 Test formatted input/output to/from character arrays with strides
! other than 1.  Contributed by Jerry DeLisle .
! other than 1.  Contributed by Jerry DeLisle .
      program arrayio_6
      program arrayio_6
      implicit none
      implicit none
      integer         :: i(3),j,k(3)
      integer         :: i(3),j,k(3)
      character(12)  :: r(4,4,4) = '0123456789AB'
      character(12)  :: r(4,4,4) = '0123456789AB'
      character(12)  :: s(64)
      character(12)  :: s(64)
      equivalence(r,s)
      equivalence(r,s)
      i = (/(j,j=1,3)/)
      i = (/(j,j=1,3)/)
      write(r(1:4:2,2:4:1,3:4:2),'(3(2x,i4/)/3(3x,i6/))') i
      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(36).ne.'0123456789AB') call abort()
      if (s(37).ne.'     1      ') call abort()
      if (s(37).ne.'     1      ') call abort()
      if (s(38).ne.'0123456789AB') call abort()
      if (s(38).ne.'0123456789AB') call abort()
      if (s(39).ne.'     2      ') call abort()
      if (s(39).ne.'     2      ') call abort()
      if (s(40).ne.'0123456789AB') call abort()
      if (s(40).ne.'0123456789AB') call abort()
      if (s(41).ne.'     3      ') call abort()
      if (s(41).ne.'     3      ') call abort()
      if (s(42).ne.'0123456789AB') call abort()
      if (s(42).ne.'0123456789AB') call abort()
      if (s(43).ne.'            ') call abort()
      if (s(43).ne.'            ') call abort()
      if (s(44).ne.'0123456789AB') call abort()
      if (s(44).ne.'0123456789AB') call abort()
      if (s(45).ne.'            ') call abort()
      if (s(45).ne.'            ') call abort()
      if (s(46).ne.'0123456789AB') call abort()
      if (s(46).ne.'0123456789AB') call abort()
      k = i
      k = i
      i = 0
      i = 0
      read(r(1:4:2,2:4:1,3:4:2),'(3(2x,i4/)/3(3x,i6/))') i
      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()
      if (any(i.ne.k)) call abort()
      end program arrayio_6
      end program arrayio_6
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.