OSDN Git Service

PR c++/9335
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / generic_17.f90
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.
5 !
6 ! Contributed by Salvatore Filippone  <sfilippone@uniroma2.it>
7 !
8 module s_foo_mod\r
9   type s_foo_type\r
10     real(kind(1.e0)) :: v\r
11   end type s_foo_type\r
12   interface foobar\r
13     subroutine s_foobar(x)\r
14       import \r
15       type(s_foo_type), intent (inout) :: x\r
16     end subroutine s_foobar\r
17   end interface\r
18 end module s_foo_mod\r
19 \r
20 module d_foo_mod\r
21   type d_foo_type\r
22     real(kind(1.d0)) :: v\r
23   end type d_foo_type\r
24   interface foobar\r
25     subroutine d_foobar(x)\r
26       import  \r
27       type(d_foo_type), intent (inout) :: x\r
28     end subroutine d_foobar\r
29   end interface\r
30 end module d_foo_mod\r
31 \r
32 module foo_mod\r
33   use s_foo_mod\r
34   use d_foo_mod\r
35 end module foo_mod\r
36 \r
37 subroutine s_foobar(x)  \r
38   use foo_mod\r
39 end subroutine s_foobar\r
40 ! { dg-final { cleanup-modules "s_foo_mod d_foo_mod foo_mod" } }