OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [der_array_io_1.f90] - Blame information for rev 551

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! 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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.