summaryrefslogtreecommitdiff
path: root/openmp
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2018-08-13 17:26:18 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2018-08-13 17:26:18 +0000
commit9ce6a165a095f1b265f7703d938c7d602bfd1999 (patch)
treeeeeadb98f1155dd321f05463083f65302643eccf /openmp
parentd8c8ad1d7bb59792c8f383bb62350a1fa0557083 (diff)
[OMPT] Make omp_control_tool() compliant when called from Fortran programs
This change fixes an incorrect behavior of the omp_control_tool function when called from Fortran applications. A tool callback function for this event is supposed to get NULL for the third argument according to the specification, but the current implementation just passes a garbage value. A possible fix is to use the OPTIONAL attribute for the third argument. Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D50565
Diffstat (limited to 'openmp')
-rw-r--r--openmp/runtime/src/include/50/omp_lib.f90.var3
-rw-r--r--openmp/runtime/src/include/50/omp_lib.h.var3
2 files changed, 4 insertions, 2 deletions
diff --git a/openmp/runtime/src/include/50/omp_lib.f90.var b/openmp/runtime/src/include/50/omp_lib.f90.var
index 60aa8dd19ff..5d855a6bdab 100644
--- a/openmp/runtime/src/include/50/omp_lib.f90.var
+++ b/openmp/runtime/src/include/50/omp_lib.f90.var
@@ -531,11 +531,12 @@
integer (kind=omp_lock_hint_kind), value :: hint
end subroutine omp_init_nest_lock_with_hint
- function omp_control_tool(command, modifier) bind(c)
+ function omp_control_tool(command, modifier, arg) bind(c)
use omp_lib_kinds
integer (kind=omp_integer_kind) omp_control_tool
integer (kind=omp_control_tool_kind), value :: command
integer (kind=omp_control_tool_kind), value :: modifier
+ integer (kind=kmp_pointer_kind), optional :: arg
end function omp_control_tool
end interface
diff --git a/openmp/runtime/src/include/50/omp_lib.h.var b/openmp/runtime/src/include/50/omp_lib.h.var
index 5ac334b1b88..d4f57369bcb 100644
--- a/openmp/runtime/src/include/50/omp_lib.h.var
+++ b/openmp/runtime/src/include/50/omp_lib.h.var
@@ -506,11 +506,12 @@
integer (kind=omp_lock_hint_kind), value :: hint
end subroutine omp_init_nest_lock_with_hint
- function omp_control_tool(command, modifier) bind(c)
+ function omp_control_tool(command, modifier, arg) bind(c)
import
integer (kind=omp_integer_kind) omp_control_tool
integer (kind=omp_control_tool_kind), value :: command
integer (kind=omp_control_tool_kind), value :: modifier
+ integer (kind=kmp_pointer_kind), optional :: arg
end function omp_control_tool
end interface