2008-09-18 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / generic_17.f90
blob968d9c10c3707e8c8d4db0c303dc9051222e9260
1 ! { dg-do compile }
2 ! Test the patch for PR36374 in which the different
3 ! symbols for 'foobar' would be incorrectly flagged as
4 ! ambiguous in foo_mod.
6 ! Contributed by Salvatore Filippone <sfilippone@uniroma2.it>
8 module s_foo_mod
9 type s_foo_type
10 real(kind(1.e0)) :: v
11 end type s_foo_type
12 interface foobar
13 subroutine s_foobar(x)
14 import
15 type(s_foo_type), intent (inout) :: x
16 end subroutine s_foobar
17 end interface
18 end module s_foo_mod
20 module d_foo_mod
21 type d_foo_type
22 real(kind(1.d0)) :: v
23 end type d_foo_type
24 interface foobar
25 subroutine d_foobar(x)
26 import
27 type(d_foo_type), intent (inout) :: x
28 end subroutine d_foobar
29 end interface
30 end module d_foo_mod
32 module foo_mod
33 use s_foo_mod
34 use d_foo_mod
35 end module foo_mod
37 subroutine s_foobar(x)
38 use foo_mod
39 end subroutine s_foobar
40 ! { dg-final { cleanup-modules "s_foo_mod d_foo_mod foo_mod" } }