Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gfortran.dg / used_types_19.f90
blobdbec8dc1c8e41d2b3617aeda47a3761a529308b1
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.
6 ! Contributed by Janus Weil <jaydub66@gmail.com>
8 module A
9 type A_type
10 real comp
11 end type
12 end module A
14 module B
15 use A
16 private
17 type(A_type) :: B_var
18 public:: B_var
19 end module B
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" } }