| 1 |
! Chekc that BIND(C) is carried over to the fir.call |
| 2 |
! RUN: bbc -emit-hlfir %s -o - | FileCheck %s |
| 3 |
|
| 4 |
module mod |
| 5 |
interface |
| 6 |
complex(kind=4) function foo4c(j) bind(c) |
| 7 |
integer, intent(in),value :: j |
| 8 |
end function foo4c |
| 9 |
end interface |
| 10 |
end module mod |
| 11 |
|
| 12 |
program main |
| 13 |
use mod |
| 14 |
procedure(foo4c), pointer :: fptr4c |
| 15 |
complex(kind=4) :: res4 |
| 16 |
fptr4c => foo4c |
| 17 |
res4 = fptr4c(6) |
| 18 |
end |
| 19 |
|
| 20 |
! CHECK-LABEL: func.func @_QQmain() |
| 21 |
! CHECK: fir.call %{{.*}}(%{{.*}}) fastmath<contract> {is_bind_c} : (i32) -> !fir.complex<4> |