Update ChangeLog and version files for release
[official-gcc.git] / gcc / testsuite / gfortran.dg / der_array_io_1.f90
blob244b600746c615bec97d4b34ff6b13eea2c0fc1c
1 ! Test IO of arrays of integers in derived types
2 ! { dg-do run }
3 ! { dg-options "-std=legacy" }
5 program main
7 character* 10000 :: buf1, buf2
8 type xyz
9 integer :: x, y(3), z
10 end type xyz
12 type (xyz) :: foo(4)
14 do i=1,ubound(foo,1)
15 foo(i)%x = 100*i
16 do j=1,3
17 foo(i)%y(j) = 100*i + 10*j
18 enddo
19 foo(i)%z = 100*i+40
20 enddo
22 write (buf1, '(20i4)') foo
23 write (buf2, '(20i4)') (foo(i)%x, (foo(i)%y(j), j=1,3), foo(i)%z, i=1,4)
25 if (buf1.ne.buf2) call abort
26 end program main