aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/generic_11.f90
blob: decc0aeebbaec0d38bc653c98dc8f7dac3fcf2b3 (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
! { dg-do compile }
! Test the fix for PR25135 in which the ambiguity between subroutine
! foo in m_foo and interface foo in m_bar was not recognised.
!
!Contributed by Yusuke IGUCHI <iguchi@coral.t.u-tokyo.ac.jp>
!
module m_foo
contains
  subroutine foo
    print *, "foo"
  end subroutine
end module

module m_bar
  interface foo
    module procedure bar
  end interface
contains
  subroutine bar
    print *, "bar"
  end subroutine
end module

use m_foo
use m_bar

call foo ! { dg-error "is an ambiguous reference" } 
end