OSDN Git Service

2007-12-06 Paul Thomas <pault@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / used_types_19.f90
1 ! { dg-do compile }
2 ! Tests the fix for PR34335 a regression in which the PRIVATE attribute
3 ! of type(a) in module b would be ignored and would prevent it being
4 ! loaded in the main program.
5 !
6 ! Contributed by Janus Weil <jaydub66@gmail.com>
7 !
8 module A
9   type A_type
10     real comp
11   end type
12 end module A
13
14 module B
15   use A
16   private
17   type(A_type) :: B_var
18   public:: B_var
19 end module B
20
21 program C
22   use B
23   use A
24   type(A_type):: A_var
25 end program C
26 ! { dg-final { cleanup-modules "a b" } }