[flang] Support lowering of intrinsic module procedure C_FUNLOC
As Fortran 2018 18.2.3.5, the intrinsic c_funloc(x) gets the C address of argument x. It returns the scalar of type C_FUNPTR. As defined in iso_c_binding in flang/module/__fortran_builtins.f90, C_FUNPTR is the derived type with only one component of integer 64. This follows the implementation of https://reviews.llvm.org/D129659. The argument is lowered as ProcBox and the address is generated using fir.box_addr. Reviewed By: jeanPerier, clementval Differential Revision: https://reviews.llvm.org/D132273
Loading
Please sign in to comment