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 name" }
11 end subroutine sub0 ! { dg-error "Expecting END MODULE" }
13 subroutine sub1() bind(c, name="$") ! { dg-error "Invalid C name" }
14 end subroutine sub1 ! { dg-error "Expecting END MODULE" }
16 subroutine sub2() bind(c, name="abc$") ! { dg-error "Invalid C name" }
17 end subroutine sub2 ! { dg-error "Expecting END MODULE" }
19 subroutine sub3() bind(c, name="abc d") ! { dg-error "Embedded space" }
20 end subroutine sub3 ! { dg-error "Expecting END MODULE" }
22 subroutine sub5() BIND(C, name=" myvar 2 ") ! { dg-error "Embedded space" }
23 end subroutine sub5 ! { dg-error "Expecting END MODULE" }
25 subroutine sub6() bind(c, name=" ) ! { dg-error "Invalid C name" }
26 end subroutine sub6 ! { dg-error "Expecting END MODULE" }
28 subroutine sub7() bind(c, name=) ! { dg-error "Syntax error" }
29 end subroutine sub7 ! { dg-error "Expecting END MODULE" }
31 subroutine sub8() bind(c, name) ! { dg-error "Syntax error" }
32 end subroutine sub8 ! { dg-error "Expecting END MODULE" }
33 end module binding_label_tests_2
35 ! { dg-final { cleanup-modules "binding_label_tests_2" } }