diff options
| author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-08-13 17:26:18 +0000 |
|---|---|---|
| committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-08-13 17:26:18 +0000 |
| commit | a3f6d4c5b8c3779c892644a048aef5bbd4f42d5a (patch) | |
| tree | 7d5c1a18e728e700ce7473b1252cb34403ed30cb /openmp | |
| parent | 82edf8d3297ea234698466ed7b7febb447e74ed1 (diff) | |
| download | bcm5719-llvm-a3f6d4c5b8c3779c892644a048aef5bbd4f42d5a.tar.gz bcm5719-llvm-a3f6d4c5b8c3779c892644a048aef5bbd4f42d5a.zip | |
[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
llvm-svn: 339585
Diffstat (limited to 'openmp')
| -rw-r--r-- | openmp/runtime/src/include/50/omp_lib.f90.var | 3 | ||||
| -rw-r--r-- | openmp/runtime/src/include/50/omp_lib.h.var | 3 |
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 |

