Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / bind-c03.f90
blob03a544b1954d7c268fe78eb888090be1c15983fb
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
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 procedure(proc1), bind(c) :: pc1 ! no error
18 !ERROR: An interface name with BIND attribute must be specified if the BIND attribute is specified in a procedure declaration statement
19 procedure(proc2), bind(c) :: pc2
21 !ERROR: An interface name with BIND attribute must be specified if the BIND attribute is specified in a procedure declaration statement
22 procedure(integer), bind(c) :: pc3
24 end