2 module binding_label_tests_2
5 ! this is just here so at least one of the subroutines will be accepted so
6 ! gfortran doesn't give an Extension warning when using -pedantic-errors
10 subroutine sub0() bind(c, name=" 1") ! { dg-error "Invalid C identifier" }
11 end subroutine sub0 ! { dg-error "Expecting END MODULE" }
13 subroutine sub1() bind(c, name="$")
16 subroutine sub2() bind(c, name="abc$")
19 subroutine sub3() bind(c, name="abc d") ! { dg-error "Invalid C identifier" }
20 end subroutine sub3 ! { dg-error "Expecting END MODULE" }
22 subroutine sub4() bind(c, name="2foo") ! { dg-error "Invalid C identifier" }
23 end subroutine sub4 ! { dg-error "Expecting END MODULE" }
25 subroutine sub5() BIND(C, name=" myvar 2 ") ! { dg-error "Invalid C identifier" }
26 end subroutine sub5 ! { dg-error "Expecting END MODULE" }
28 subroutine sub6() bind(c, name=" ) ! { dg-error "Invalid C identifier" }
29 end subroutine sub6 ! { dg-error "Expecting END MODULE" }
31 subroutine sub7() bind(c, name=) ! { dg-error "Invalid character" }
32 end subroutine sub7 ! { dg-error "Expecting END MODULE" }
34 subroutine sub8() bind(c, name) ! { dg-error "Syntax error" }
35 end subroutine sub8 ! { dg-error "Expecting END MODULE" }
36 end module binding_label_tests_2