xref: /llvm-project/flang/test/Semantics/bind-c14.f90 (revision 1062c140f811fabb7a926fde74112ea4d2330b74)
1! RUN: %python %S/test_errors.py %s %flang_fc1 -funderscoring
2
3subroutine conflict1()
4end subroutine
5
6!ERROR: BIND(C) procedure assembly name conflicts with non BIND(C) procedure assembly name
7subroutine foo(x)  bind(c, name="conflict1_")
8  real :: x
9end subroutine
10
11subroutine no_conflict1() bind(c, name="")
12end subroutine
13subroutine foo2() bind(c, name="conflict2_")
14end subroutine
15
16subroutine bar()
17  interface
18    subroutine no_conflict1() bind(c, name="")
19    end subroutine
20    ! ERROR: Non BIND(C) procedure assembly name conflicts with BIND(C) procedure assembly name
21    subroutine conflict2()
22    end subroutine
23  end interface
24  call no_conflict1()
25  call conflict2
26end subroutine
27
28subroutine no_conflict2() bind(c, name="no_conflict2_")
29end subroutine
30
31subroutine _()
32end subroutine
33
34subroutine dash_no_conflict() bind(c, name="")
35end subroutine
36