diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu --- a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu +++ b/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu @@ -76,6 +76,7 @@ omptarget_nvptx_threadPrivateContext->GetTopLevelTaskDescr(threadId); nThreads = GetNumberOfWorkersInTeam(); threadLimit = ThreadLimit; + omptarget_nvptx_workFn = 0; } EXTERN void __kmpc_kernel_deinit(int16_t IsOMPRuntimeInitialized) {