[Openmp-commits] [openmp] 6d658f3 - [Openmp]: Missing import statement in openmp interface for Fortran
Malhar Jajoo via Openmp-commits
openmp-commits at lists.llvm.org
Tue Mar 1 09:37:18 PST 2022
Author: Malhar Jajoo
Date: 2022-03-01T17:33:06Z
New Revision: 6d658f37a4ba5a6f3efd732126a6046ddfbbb5f7
URL: https://github.com/llvm/llvm-project/commit/6d658f37a4ba5a6f3efd732126a6046ddfbbb5f7
DIFF: https://github.com/llvm/llvm-project/commit/6d658f37a4ba5a6f3efd732126a6046ddfbbb5f7.diff
LOG: [Openmp]: Missing import statement in openmp interface for Fortran
Essentially removed the "use omp_lib_kinds" statement and replaced it
with import to maintain consistency (and avoid compilation error
in case the omp_lib_kinds.mod file is not accessible) in header file.
The import is required to access entities in host scoping unit.
Differential Revision: https://reviews.llvm.org/D120707
Added:
Modified:
openmp/runtime/src/include/omp_lib.h.var
Removed:
################################################################################
diff --git a/openmp/runtime/src/include/omp_lib.h.var b/openmp/runtime/src/include/omp_lib.h.var
index a8287beee66c7..3a49b8a36bac9 100644
--- a/openmp/runtime/src/include/omp_lib.h.var
+++ b/openmp/runtime/src/include/omp_lib.h.var
@@ -746,24 +746,24 @@
end function omp_target_is_accessible
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
end function omp_alloc
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
end function omp_aligned_alloc
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
@@ -771,8 +771,8 @@
function omp_aligned_calloc(alignment, 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_aligned_calloc
integer(c_size_t), value :: alignment, nmemb, size
integer(omp_allocator_handle_kind), value :: allocator
@@ -780,8 +780,8 @@
function omp_realloc(ptr, size, allocator, &
& 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
@@ -790,8 +790,8 @@
end function omp_realloc
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
More information about the Openmp-commits
mailing list