[Openmp-commits] [openmp] r339585 - [OMPT] Make omp_control_tool() compliant when called from Fortran programs
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Mon Aug 13 10:26:19 PDT 2018
Author: jlpeyton
Date: Mon Aug 13 10:26:18 2018
New Revision: 339585
URL: http://llvm.org/viewvc/llvm-project?rev=339585&view=rev
Log:
[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
Modified:
openmp/trunk/runtime/src/include/50/omp_lib.f90.var
openmp/trunk/runtime/src/include/50/omp_lib.h.var
Modified: openmp/trunk/runtime/src/include/50/omp_lib.f90.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/50/omp_lib.f90.var?rev=339585&r1=339584&r2=339585&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/50/omp_lib.f90.var (original)
+++ openmp/trunk/runtime/src/include/50/omp_lib.f90.var Mon Aug 13 10:26:18 2018
@@ -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
Modified: openmp/trunk/runtime/src/include/50/omp_lib.h.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/50/omp_lib.h.var?rev=339585&r1=339584&r2=339585&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/50/omp_lib.h.var (original)
+++ openmp/trunk/runtime/src/include/50/omp_lib.h.var Mon Aug 13 10:26:18 2018
@@ -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
More information about the Openmp-commits
mailing list