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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 149 jeremybenn
! PR23843
2
! Make sure derived type I/O with PRIVATE components works where it's allowed
3
module m1
4
  type t1
5
     integer i
6
  end type t1
7
end module m1
8
 
9
module m2
10
  use m1
11
 
12
  type t2
13
     private
14
     type (t1) t
15
  end type t2
16
 
17
  type t3
18
     private
19
     integer i
20
  end type t3
21
 
22
contains
23
  subroutine test
24
    character*20 c
25
    type(t2) :: a
26
    type(t3) :: b
27
 
28
    a % t % i = 31337
29
    b % i = 255
30
 
31
    write(c,*) a
32
    if (trim(adjustl(c)) /= "31337") call abort
33
    write(c,*) b
34
    if (trim(adjustl(c)) /= "255") call abort
35
  end subroutine test
36
end module m2
37
 
38
use m2
39
call test
40
end
41
 
42
! { dg-final { cleanup-modules "m1 m2" } }

powered by: WebSVN 2.1.0

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