aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/generic_17.f90
blob: bd919bcb364f90c210cb2d45c4827a2dd1da06df (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
! { 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_foobar2(x)  
  use foo_mod
end subroutine s_foobar2