| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-std=f2003" } |
| 3 |
! |
| 4 |
! PR fortran/55758 |
| 5 |
! |
| 6 |
|
| 7 |
function sub2() bind(C) ! { dg-error "GNU Extension: LOGICAL result variable 'sub2' at .1. with non-C_Bool kind in BIND.C. procedure 'sub2'" } |
| 8 |
logical(kind=8) :: sub2 |
| 9 |
logical(kind=4) :: local ! OK |
| 10 |
end function sub2 |
| 11 |
|
| 12 |
function sub4() bind(C) result(res) ! { dg-error "GNU Extension: LOGICAL result variable 'res' at .1. with non-C_Bool kind in BIND.C. procedure 'sub4'" } |
| 13 |
logical(kind=2) :: res |
| 14 |
logical(kind=4) :: local ! OK |
| 15 |
end function sub4 |
| 16 |
|
| 17 |
|
| 18 |
subroutine sub(x) bind(C) ! { dg-error "GNU Extension: LOGICAL dummy argument 'x' at .1. with non-C_Bool kind in BIND.C. procedure 'sub'" } |
| 19 |
logical(kind=2) :: x |
| 20 |
end subroutine sub |
| 21 |
|
| 22 |
subroutine sub3(y) bind(C) |
| 23 |
use iso_c_binding, only : c_bool |
| 24 |
logical(kind=c_bool) :: y ! OK |
| 25 |
end subroutine sub3 |