OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[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 ! { dg-options "-std=legacy" }
4 !
5 program main
6
7   character* 10000 :: buf1, buf2
8   type xyz
9      integer :: x, y(3), z
10   end type xyz
11
12   type (xyz) :: foo(4)
13
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
21
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)
24
25   if (buf1.ne.buf2) call abort
26 end program main