Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gfortran.dg / der_io_3.f90
blob5fdc72454222bf4d24dbe9cdb5a389caefa8b46f
1 ! 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
9 module m2
10 use m1
12 type t2
13 private
14 type (t1) t
15 end type t2
17 type t3
18 private
19 integer i
20 end type t3
22 contains
23 subroutine test
24 character*20 c
25 type(t2) :: a
26 type(t3) :: b
28 a % t % i = 31337
29 b % i = 255
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
38 use m2
39 call test
40 end