2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / generic_11.f90
blobdecc0aeebbaec0d38bc653c98dc8f7dac3fcf2b3
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