aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/bind_c_bool_1.f90
blob: 871405a77b0066c08b079d1a625cb7a0954079a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
! { dg-do compile }
! { dg-options "-std=f2003" }
!
! PR fortran/55758
!

function sub2() bind(C) ! { dg-error "GNU Extension: LOGICAL result variable 'sub2' at .1. with non-C_Bool kind in BIND.C. procedure 'sub2'" }
  logical(kind=8) :: sub2
  logical(kind=4) :: local ! OK
end function sub2

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'" }
  logical(kind=2) :: res
  logical(kind=4) :: local ! OK
end function sub4


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'" }
  logical(kind=2) :: x
end subroutine sub

subroutine sub3(y) bind(C)
  use iso_c_binding, only : c_bool
  logical(kind=c_bool) :: y ! OK
end subroutine sub3