xref: /llvm-project/flang/test/Lower/call-bindc.f90 (revision c4204c0b29a6721267b1bcbaeedd7b1118e42396)
19482af3dSValentin Clement (バレンタイン クレメン)! Chekc that BIND(C) is carried over to the fir.call
29482af3dSValentin Clement (バレンタイン クレメン)! RUN: bbc -emit-hlfir %s -o - | FileCheck %s
39482af3dSValentin Clement (バレンタイン クレメン)
49482af3dSValentin Clement (バレンタイン クレメン)module mod
59482af3dSValentin Clement (バレンタイン クレメン)  interface
69482af3dSValentin Clement (バレンタイン クレメン)    complex(kind=4) function foo4c(j) bind(c)
79482af3dSValentin Clement (バレンタイン クレメン)      integer, intent(in),value :: j
89482af3dSValentin Clement (バレンタイン クレメン)    end function foo4c
99482af3dSValentin Clement (バレンタイン クレメン)  end interface
109482af3dSValentin Clement (バレンタイン クレメン)end module mod
119482af3dSValentin Clement (バレンタイン クレメン)
129482af3dSValentin Clement (バレンタイン クレメン)program main
139482af3dSValentin Clement (バレンタイン クレメン)  use mod
149482af3dSValentin Clement (バレンタイン クレメン)  procedure(foo4c), pointer :: fptr4c
159482af3dSValentin Clement (バレンタイン クレメン)  complex(kind=4) :: res4
169482af3dSValentin Clement (バレンタイン クレメン)  fptr4c => foo4c
179482af3dSValentin Clement (バレンタイン クレメン)  res4 = fptr4c(6)
189482af3dSValentin Clement (バレンタイン クレメン)end
199482af3dSValentin Clement (バレンタイン クレメン)
209482af3dSValentin Clement (バレンタイン クレメン)! CHECK-LABEL: func.func @_QQmain()
21*c4204c0bSjeanPerier! CHECK: fir.call %{{.*}}(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (i32) -> complex<f32>
22