2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / interface_8.f90
blob2060e7dd66d32f0abdaa5529ce4875a713338fa4
1 ! { dg-do compile }
2 ! One of the tests of the patch for PR30068.
3 ! Taken from comp.lang.fortran 3rd December 2006.
5 ! Although the generic procedure is not referenced and it would
6 ! normally be permissible for it to be ambiguous, the USE, ONLY
7 ! statement is effectively a reference and is invalid.
9 module mod1
10 interface generic
11 subroutine foo(a)
12 real :: a
13 end subroutine
14 end interface generic
15 end module mod1
17 module mod2
18 interface generic
19 subroutine bar(a)
20 real :: a
21 end subroutine
22 end interface generic
23 end module mod2
25 program main
26 use mod1, only: generic ! { dg-warning "has ambiguous interfaces" }
27 use mod2
28 end program main