OSDN Git Service

PR testsuite/35406
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / der_array_io_1.f90
1 ! Test IO of arrays of integers in derived types
2 ! { dg-do run }
3 program main
4
5   character* 10000 :: buf1, buf2
6   type xyz
7      integer :: x, y(3), z
8   end type xyz
9
10   type (xyz) :: foo(4)
11
12   do i=1,ubound(foo,1)
13      foo(i)%x = 100*i
14      do j=1,3
15         foo(i)%y(j) = 100*i + 10*j 
16      enddo
17      foo(i)%z = 100*i+40
18   enddo
19
20   write (buf1, '(20i4)')  foo
21   write (buf2, '(20i4)')  (foo(i)%x, (foo(i)%y(j), j=1,3), foo(i)%z, i=1,4)
22
23   if (buf1.ne.buf2) call abort
24 end program main