2004-09-16 Victor Leikehman <lei@il.ibm.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / der_array_io_1.f90
blob5bfd0c64547c91d5d36b3a297b7c7d555439fdd2
1 ! Test IO of arrays of integers in derived types
2 ! { dg-do run }
3 program main
5 character* 10000 :: buf1, buf2
6 type xyz
7 integer :: x, y(3), z
8 end type xyz
10 type (xyz) :: foo(4)
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
20 print (buf1, '(20i4)'), foo
21 print (buf2, '(20i4)'), (foo(i)%x, (foo(i)%y(j), j=1,3), foo(i)%z, i=1,4)
23 if (buf1.ne.buf2) call abort
24 end program main