| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-Wc-binding-type" } |
| 3 |
module bind_c_procs |
| 4 |
use, intrinsic :: iso_c_binding, only: c_int |
| 5 |
|
| 6 |
interface |
| 7 |
! warning for my_param possibly not being C interoperable |
| 8 |
subroutine my_c_sub(my_param) bind(c) ! { dg-warning "may not be C interoperable" } |
| 9 |
integer, value :: my_param |
| 10 |
end subroutine my_c_sub |
| 11 |
|
| 12 |
! warning for my_c_func possibly not being a C interoperable kind |
| 13 |
! warning for my_param possibly not being C interoperable |
| 14 |
! error message truncated to provide an expression that both warnings |
| 15 |
! should match. |
| 16 |
function my_c_func(my_param) bind(c) ! { dg-warning "may not be" } |
| 17 |
integer, value :: my_param |
| 18 |
integer :: my_c_func |
| 19 |
end function my_c_func |
| 20 |
end interface |
| 21 |
|
| 22 |
contains |
| 23 |
! warning for my_param possibly not being C interoperable |
| 24 |
subroutine my_f03_sub(my_param) bind(c) ! { dg-warning "may not be" } |
| 25 |
integer, value :: my_param |
| 26 |
end subroutine my_f03_sub |
| 27 |
|
| 28 |
! warning for my_f03_func possibly not being a C interoperable kind |
| 29 |
! warning for my_param possibly not being C interoperable |
| 30 |
! error message truncated to provide an expression that both warnings |
| 31 |
! should match. |
| 32 |
function my_f03_func(my_param) bind(c) ! { dg-warning "may not be" } |
| 33 |
integer, value :: my_param |
| 34 |
integer :: my_f03_func |
| 35 |
my_f03_func = 1 |
| 36 |
end function my_f03_func |
| 37 |
|
| 38 |
end module bind_c_procs |