xref: /llvm-project/flang/test/Semantics/resolve19.f90 (revision 6c1ac141d3c98af9738bc77fcb55602cbff7751f)
1! RUN: %python %S/test_errors.py %s %flang_fc1
2module m
3  interface a
4    subroutine s(x)
5      real :: x
6    end subroutine
7    !ERROR: 's' is already declared in this scoping unit
8    subroutine s(x)
9      integer :: x
10    end subroutine
11  end interface
12end module
13
14module m2
15  interface s
16    subroutine s(x)
17      real :: x
18    end subroutine
19    !ERROR: 's' is already declared in this scoping unit
20    subroutine s(x)
21      integer :: x
22    end subroutine
23  end interface
24end module
25
26module m3
27  interface s
28    subroutine s
29    end
30  end interface
31contains
32  !ERROR: 's' is already declared in this scoping unit
33  subroutine s
34  end subroutine
35end
36