summaryrefslogtreecommitdiff
path: root/flang/module
diff options
context:
space:
mode:
authorPeter Klausler <pklausler@nvidia.com>2022-08-25 10:24:53 -0700
committerPeter Klausler <pklausler@nvidia.com>2022-08-25 15:47:17 -0700
commit194778117e57360686eac9bfec7a85f43bbdc628 (patch)
treeb99ca65672540fe6c34a25066c88147f344955bd /flang/module
parent0355a54a2d2b39b100f30116144e50164b8d2750 (diff)
downloadllvm-194778117e57360686eac9bfec7a85f43bbdc628.tar.gz
[flang] Make C_F_POINTER a generic interface
The intrinsic procedure C_F_POINTER needs to be a generic interface in intrinsic module ISO_C_BINDING. (It also needs to be implemented, but that remains a TODO for either lowering or the runtime.) Differential Revision: https://reviews.llvm.org/D132685
Diffstat (limited to 'flang/module')
-rw-r--r--flang/module/iso_c_binding.f9010
1 files changed, 9 insertions, 1 deletions
diff --git a/flang/module/iso_c_binding.f90 b/flang/module/iso_c_binding.f90
index 347b917223d8..0fcebc7bd751 100644
--- a/flang/module/iso_c_binding.f90
+++ b/flang/module/iso_c_binding.f90
@@ -83,6 +83,10 @@ module iso_c_binding
end interface
private :: c_associated_c_ptr, c_associated_c_funptr
+ interface c_f_procpointer
+ module procedure c_f_procpointer
+ end interface
+
! gfortran extensions
integer, parameter :: &
c_float128 = 16, &
@@ -120,6 +124,10 @@ module iso_c_binding
c_funloc = c_funptr(loc(x))
end function c_funloc
- ! TODO c_f_procpointer
+ subroutine c_f_procpointer(cptr, fptr)
+ type(c_funptr), intent(in) :: cptr
+ procedure(), pointer, intent(out) :: fptr
+ ! TODO: implement
+ end subroutine c_f_procpointer
end module iso_c_binding