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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [arrayio_derived_1.f90] - Blame information for rev 827

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! PR 24862: IO for arrays of derived type handled incorrectly.
3
program arrayio_derived_1
4
  implicit none
5
  type tp
6
     integer :: i
7
     character(len=1) :: c
8
  end type tp
9
  type(tp) :: x(5)
10
  character(len=100) :: a
11
  integer :: i, b(5)
12
 
13
  x%i = 256
14
  x%c = "q"
15
 
16
  write(a, *) x%i
17
  read(a, *) b
18
  do i = 1, 5
19
     if (b(i) /= 256) then
20
        call abort ()
21
     end if
22
  end do
23
  write(a, *) x ! Just test that the library doesn't abort.
24
  write(a, *) x(:)%i
25
  b = 0
26
  read(a, *) b
27
  do i = 1, 5
28
     if (b(i) /= 256) then
29
        call abort ()
30
     end if
31
  end do
32
 
33
end program arrayio_derived_1

powered by: WebSVN 2.1.0

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