4 bind(c) :: test, sub1 ! { dg-error "only be used for variables or common blocks" }
5 bind(c) :: sub2 ! { dg-error "only be used for variables or common blocks" }
7 function foo() bind(c,name="xx")
8 integer(c_int),bind(c,name="xy") :: foo ! { dg-error "only be used for variables or common blocks" }
9 ! NAG f95: "BIND(C) for non-variable FOO"
10 ! g95: "Duplicate BIND attribute specified"
16 integer(c_int) :: test
17 bind(c,name="kk") :: test ! { dg-error "only be used for variables or common blocks" }
18 ! NAG f95: "BIND(C) for non-variable TEST"
19 ! gfortran, g95: Accepted
23 function bar() bind(c)
25 bind(c,name="zx") :: bar ! { dg-error "only be used for variables or common blocks" }
29 subroutine sub0() bind(c)
30 bind(c) :: sub0 ! { dg-error "only be used for variables or common blocks" }
33 subroutine sub1(i) bind(c)
34 use, intrinsic :: iso_c_binding, only: c_int
35 integer(c_int), value :: i
39 use, intrinsic :: iso_c_binding, only: c_int
40 integer(c_int), value :: i
44 use, intrinsic :: iso_c_binding, only: c_int
45 integer(c_int), value :: i
46 bind(c) :: sub3 ! { dg-error "only be used for variables or common blocks" }