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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [der_array_io_2.f90] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! Test IO of arrays in derived type arrays
2
! { dg-do run }
3
program main
4
 
5
  character *1000 buf1, buf2
6
 
7
  type :: foo_type
8
     integer x(3)
9
     integer y(4)
10
     integer z(5)
11
     character*11 a(3)
12
  end type foo_type
13
 
14
  type (foo_type) :: foo(2)
15
 
16
  foo(1)%x = 3
17
  foo(1)%y = 4
18
  foo(1)%z = 5
19
  foo(1)%a = "hello world"
20
 
21
  foo(2)%x = 30
22
  foo(2)%y = 40
23
  foo(2)%z = 50
24
  foo(2)%a = "HELLO WORLD"
25
 
26
  write (buf1,*)  foo
27
  write (buf2,*) ((foo(i)%x(j),j=1,3), (foo(i)%y(j),j=1,4), (foo(i)%z(j),j=1,5), (foo(i)%a(j),j=1,3), i=1,2)
28
  if (buf1.ne.buf2) call abort
29
end program main

powered by: WebSVN 2.1.0

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