40 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! Check for multiple symbols being defined with with same BIND(C) name3 4module m15 integer, bind(c, name="x1") :: x16 !ERROR: Two entities have the same global name 'x1'7 integer, bind(c, name=" x1 ") :: x28 contains9 subroutine x3() bind(c, name="x3")10 end subroutine11end module12 13!ERROR: Two entities have the same global name 'x3'14subroutine x4() bind(c, name=" x3 ")15end subroutine16 17! Ensure no error in this situation18module m219 interface20 subroutine x5() bind(c, name=" x5 ")21 end subroutine22 end interface23end module24subroutine x5() bind(c, name=" x5 ")25end subroutine26 27! Ensure no error in this situation28subroutine foo() bind(c, name="x6")29end subroutine30subroutine foo() bind(c, name="x7")31end subroutine32 33subroutine entries()34 35entry e1() bind(C, name="e")36 37!ERROR: Two entities have the same global name 'e'38entry e2() bind(C, name="e")39end subroutine40