1! RUN: %S/test_errors.sh %s %t %flang_fc1
2! REQUIRES: shell
3! Check for multiple symbols being defined with with same BIND(C) name
4
5module m1
6  integer, bind(c, name="x1") :: x1
7  !ERROR: Two symbols have the same BIND(C) name 'x1'
8  integer, bind(c, name=" x1 ") :: x2
9 contains
10  !ERROR: Two symbols have the same BIND(C) name 'x3'
11  subroutine x3() bind(c, name="x3")
12  end subroutine
13end module
14
15subroutine x4() bind(c, name=" x3 ")
16end subroutine
17
18! Ensure no error in this situation
19module m2
20 interface
21  subroutine x5() bind(c, name=" x5 ")
22  end subroutine
23 end interface
24end module
25subroutine x5() bind(c, name=" x5 ")
26end subroutine
27