aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/used_types_14.f90
blob: bc166a8d55e7af39226ac0495b16ba5f30c92c4a (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
26
27
28
29
30
31
! { dg-do compile }
! Tests the fix for PR30531 in which the interface derived types
! was not being associated.
!
! Contributed by Salvatore Filippone  <sfilippone@uniroma2.it>
!
module foo_type_mod
  type foo_type
     integer, allocatable :: md(:)
  end type foo_type
end module foo_type_mod

module foo_mod

  interface
    subroutine foo_initvg(foo_a)
      use foo_type_mod
      Type(foo_type), intent(out) :: foo_a
    end subroutine foo_initvg
  end interface

contains

  subroutine foo_ext(foo_a)
    use foo_type_mod
    Type(foo_type) :: foo_a

    call foo_initvg(foo_a)
  end subroutine foo_ext

end module foo_mod