| 1 |
! { dg-do compile } |
| 2 |
module binding_label_tests_2 |
| 3 |
|
| 4 |
contains |
| 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 |
| 7 |
subroutine ok() |
| 8 |
end subroutine ok |
| 9 |
|
| 10 |
subroutine sub0() bind(c, name=" 1") ! { dg-error "Invalid C identifier" } |
| 11 |
end subroutine sub0 ! { dg-error "Expecting END MODULE" } |
| 12 |
|
| 13 |
subroutine sub1() bind(c, name="$") |
| 14 |
end subroutine sub1 |
| 15 |
|
| 16 |
subroutine sub2() bind(c, name="abc$") |
| 17 |
end subroutine sub2 |
| 18 |
|
| 19 |
subroutine sub3() bind(c, name="abc d") ! { dg-error "Invalid C identifier" } |
| 20 |
end subroutine sub3 ! { dg-error "Expecting END MODULE" } |
| 21 |
|
| 22 |
subroutine sub4() bind(c, name="2foo") ! { dg-error "Invalid C identifier" } |
| 23 |
end subroutine sub4 ! { dg-error "Expecting END MODULE" } |
| 24 |
|
| 25 |
subroutine sub5() BIND(C, name=" myvar 2 ") ! { dg-error "Invalid C identifier" } |
| 26 |
end subroutine sub5 ! { dg-error "Expecting END MODULE" } |
| 27 |
|
| 28 |
subroutine sub6() bind(c, name=" ) ! { dg-error "Invalid C identifier" } |
| 29 |
end subroutine sub6 ! { dg-error "Expecting END MODULE" } |
| 30 |
|
| 31 |
subroutine sub7() bind(c, name=) ! { dg-error "Invalid character" } |
| 32 |
end subroutine sub7 ! { dg-error "Expecting END MODULE" } |
| 33 |
|
| 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 |