aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/used_types_19.f90
blob: 406e874c42ba5060dd30328fadd2f51fa8f929a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
! { dg-do compile }
! Tests the fix for PR34335 a regression in which the PRIVATE attribute
! of type(a) in module b would be ignored and would prevent it being
! loaded in the main program.
!
! Contributed by Janus Weil <jaydub66@gmail.com>
!
module A
  type A_type
    real comp
  end type
end module A

module B
  use A
  private
  type(A_type) :: B_var
  public:: B_var
end module B

program C
  use B
  use A
  type(A_type):: A_var
end program C