2009-10-05 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / generic_11.f90
blob7547a43da76fbeb8ce9e4d4d3741ae038ba3e8f0
1 ! { dg-do compile }
2 ! Test the fix for PR25135 in which the ambiguity between subroutine
3 ! foo in m_foo and interface foo in m_bar was not recognised.
5 !Contributed by Yusuke IGUCHI <iguchi@coral.t.u-tokyo.ac.jp>
7 module m_foo
8 contains
9 subroutine foo
10 print *, "foo"
11 end subroutine
12 end module
14 module m_bar
15 interface foo
16 module procedure bar
17 end interface
18 contains
19 subroutine bar
20 print *, "bar"
21 end subroutine
22 end module
24 use m_foo
25 use m_bar
27 call foo ! { dg-error "is an ambiguous reference" }
28 end
29 ! { dg-final { cleanup-modules "m_foo m_bar" } }