1! { dg-do compile } 2! { dg-options "-std=f2003" } 3! 4! PR fortran/55758 5! 6 7function 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 10end function sub2 11 12function 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 15end function sub4 16 17 18subroutine 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 20end subroutine sub 21 22subroutine sub3(y) bind(C) 23 use iso_c_binding, only : c_bool 24 logical(kind=c_bool) :: y ! OK 25end subroutine sub3 26