summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/generic_17.f90
blob: 968d9c10c3707e8c8d4db0c303dc9051222e9260 (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
32
33
34
35
36
37
38
39
40
! { dg-do compile }
! Test the patch for PR36374 in which the different
! symbols for 'foobar' would be incorrectly flagged as
! ambiguous in foo_mod.
!
! Contributed by Salvatore Filippone  <sfilippone@uniroma2.it>
!
module s_foo_mod
  type s_foo_type
    real(kind(1.e0)) :: v
  end type s_foo_type
  interface foobar
    subroutine s_foobar(x)
      import 
      type(s_foo_type), intent (inout) :: x
    end subroutine s_foobar
  end interface
end module s_foo_mod

module d_foo_mod
  type d_foo_type
    real(kind(1.d0)) :: v
  end type d_foo_type
  interface foobar
    subroutine d_foobar(x)
      import  
      type(d_foo_type), intent (inout) :: x
    end subroutine d_foobar
  end interface
end module d_foo_mod

module foo_mod
  use s_foo_mod
  use d_foo_mod
end module foo_mod

subroutine s_foobar(x)  
  use foo_mod
end subroutine s_foobar
! { dg-final { cleanup-modules "s_foo_mod d_foo_mod foo_mod" } }