[ORC] Merge ostream operators for SymbolStringPtrs into SymbolStringPool.h. NFC.
[llvm-project.git] / flang / test / Semantics / bind-c03.f90
blobc0d2fa1555d839fda9776e2c2a218fe6cb6f69a1
1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
2 ! Check for C1521
3 ! If proc-language-binding-spec (bind(c)) is specified, the proc-interface
4 ! shall appear, it shall be an interface-name, and interface-name shall be
5 ! declared with a proc-language-binding-spec.
7 module m
9 interface
10 subroutine proc1() bind(c)
11 end
12 subroutine proc2()
13 end
14 end interface
16 interface proc3
17 subroutine proc3() bind(c)
18 end
19 end interface
21 procedure(proc1), bind(c) :: pc1 ! no error
22 procedure(proc3), bind(c) :: pc4 ! no error
24 !ERROR: An interface name with the BIND attribute must appear if the BIND attribute appears in a procedure declaration
25 procedure(proc2), bind(c) :: pc2
27 !ERROR: An interface name with the BIND attribute must appear if the BIND attribute appears in a procedure declaration
28 procedure(integer), bind(c) :: pc3
30 !ERROR: An interface name with the BIND attribute must appear if the BIND attribute appears in a procedure declaration
31 procedure(), bind(c) :: pc5
33 end