OSDN Git Service

2005-09-14 Jerry DeLisle <jvdelisle@verizon.net>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / arrayio_4.f90
1 ! { dg-do run }
2 ! PR 21875 : Test formatted input/output to/from character arrays.
3 ! This test checks the error checking for non-contiguous character
4 ! arrays which are not allowed by standard.  Error 13 is
5 ! ERROR_ARRAY_STRIDE in libgfortran.h
6 program arrayio_4
7   implicit none
8   integer        :: ierr
9   character(12)  :: r(2,3,4) = '0123456789AB'
10    
11   write(r(::2,:,::1),'(i5)', iostat=ierr) 1,2,3,4,5
12   if (ierr.ne.13) call abort()
13
14   write(r(:,:,::2),'(i5)', iostat=ierr) 1,2,3,4,5
15   if (ierr.ne.13) call abort()
16
17   write(r(::1,::2,::1),'(i5)', iostat=ierr) 1,2,3,4,5
18   if (ierr.ne.13) call abort()
19
20   write(r(::1,::1,::1),'(i5)', iostat=ierr) 1,2,3,4,5
21   if (ierr.ne.0) call abort()
22 end program arrayio_4
23