aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/interface_8.f90
blob: 2060e7dd66d32f0abdaa5529ce4875a713338fa4 (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 }
! One of the tests of the patch for PR30068.
! Taken from comp.lang.fortran 3rd December 2006.
!
! Although the generic procedure is not referenced and it would
! normally be permissible for it to be ambiguous, the USE, ONLY
! statement is effectively a reference and is invalid.
!
module mod1
   interface generic
      subroutine foo(a)
         real :: a
      end subroutine
   end interface generic
end module  mod1

module mod2
   interface generic
      subroutine bar(a)
         real :: a
      end subroutine
   end interface generic
end module  mod2

program main
  use mod1, only: generic   ! { dg-warning "has ambiguous interfaces" }
  use mod2
end program main