[Openmp-commits] [PATCH] D120707: [Openmp]: Missing import statement in openmp interface for Fortran

Malhar via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Mar 1 02:54:26 PST 2022


malharJ created this revision.
malharJ added a reviewer: AndreyChurbanov.
Herald added subscribers: guansong, yaxunl.
malharJ requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.

The extra import is required to access entities in host scoping unit.
Also looks like it's present in the other interface functions as well.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120707

Files:
  openmp/runtime/src/include/omp_lib.h.var


Index: openmp/runtime/src/include/omp_lib.h.var
===================================================================
--- openmp/runtime/src/include/omp_lib.h.var
+++ openmp/runtime/src/include/omp_lib.h.var
@@ -748,6 +748,7 @@
         function omp_alloc(size, allocator) bind(c)
           use omp_lib_kinds
           use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
+          import :: omp_allocator_handle_kind
           type(c_ptr) omp_alloc
           integer(c_size_t), value :: size
           integer(omp_allocator_handle_kind), value :: allocator
@@ -756,6 +757,7 @@
         function omp_aligned_alloc(alignment, size, allocator) bind(c)
           use omp_lib_kinds
           use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
+          import :: omp_allocator_handle_kind
           type(c_ptr) omp_aligned_alloc
           integer(c_size_t), value :: alignment, size
           integer(omp_allocator_handle_kind), value :: allocator
@@ -764,6 +766,7 @@
         function omp_calloc(nmemb, size, allocator) bind(c)
           use omp_lib_kinds
           use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
+          import :: omp_allocator_handle_kind
           type(c_ptr) omp_calloc
           integer(c_size_t), value :: nmemb, size
           integer(omp_allocator_handle_kind), value :: allocator
@@ -773,6 +776,7 @@
      &      allocator) bind(c)
           use omp_lib_kinds
           use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
+          import :: omp_allocator_handle_kind
           type(c_ptr) omp_aligned_calloc
           integer(c_size_t), value :: alignment, nmemb, size
           integer(omp_allocator_handle_kind), value :: allocator
@@ -782,6 +786,7 @@
      &      free_allocator) bind(c)
           use omp_lib_kinds
           use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
+          import :: omp_allocator_handle_kind
           type(c_ptr) omp_realloc
           type(c_ptr), value :: ptr
           integer(c_size_t), value :: size
@@ -792,6 +797,7 @@
         subroutine omp_free(ptr, allocator) bind(c)
           use omp_lib_kinds
           use, intrinsic :: iso_c_binding, only : c_ptr
+          import :: omp_allocator_handle_kind
           type(c_ptr), value :: ptr
           integer(omp_allocator_handle_kind), value :: allocator
         end subroutine omp_free


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120707.412022.patch
Type: text/x-patch
Size: 2360 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220301/2dc38fbc/attachment.bin>


More information about the Openmp-commits mailing list