Debian Codegraph @

gcc/testsuite/gfortran.dg/generic_11.f90

raw
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.
4 !
5 !Contributed by Yusuke IGUCHI <[email protected]>
6 !
7 module m_foo
8 contains
9 subroutine foo
10 print *, "foo"
11 end subroutine
12 end module
13
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
23
24 use m_foo
25 use m_bar
26
27 call foo ! { dg-error "is an ambiguous reference" }
28 end