2 ! { dg-options "-std=gnu" }
5 ! bind(C,name="...") is invalid for dummy procedures
6 ! and for internal procedures.
11 function b() bind(c,name="jakl") ! { dg-error "no binding name is allowed" }
14 end function b ! { dg-error "Expecting END INTERFACE" }
17 subroutine a() bind(c,name="") ! { dg-error "no binding name is allowed" }
18 end subroutine a ! { dg-error "Expecting END INTERFACE" }
25 subroutine int1() bind(c, name="jj") ! { dg-error "No binding name is allowed" }
26 end subroutine int1 ! { dg-error "Expected label" }
27 end subroutine internal
29 subroutine internal1()
33 integer(c_int) function int2() bind(c, name="jjj") ! { dg-error "No binding name is allowed" }
34 end function int2 ! { dg-error "Expecting END SUBROUTINE" }
35 end subroutine internal1
37 integer(c_int) function internal2()
42 subroutine int1() bind(c, name="kk") ! { dg-error "No binding name is allowed" }
43 end subroutine int1 ! { dg-error "Expecting END FUNCTION" }
44 end function internal2
46 integer(c_int) function internal3()
51 integer(c_int) function int2() bind(c, name="kkk") ! { dg-error "No binding name is allowed" }
52 end function int2 ! { dg-error "Expected label" }
53 end function internal3
59 subroutine int1() bind(c, name="mm") ! { dg-error "No binding name is allowed" }
60 end subroutine int1 ! { dg-error "Expecting END PROGRAM statement" }
61 integer(c_int) function int2() bind(c, name="mmm") ! { dg-error "No binding name is allowed" }
62 end function int2 ! { dg-error "Expecting END PROGRAM statement" }