diff --git a/openmp/libomptarget/src/omptarget.cpp b/openmp/libomptarget/src/omptarget.cpp --- a/openmp/libomptarget/src/omptarget.cpp +++ b/openmp/libomptarget/src/omptarget.cpp @@ -889,6 +889,7 @@ DP("Restoring original host pointer value " DPxMOD " for host pointer " DPxMOD "\n", DPxPTR(Itr->second.HstPtrVal), DPxPTR(ShadowHstPtrAddr)); + ++Itr; return OFFLOAD_SUCCESS; }; applyToShadowMapEntries(Device, CB, HstPtrBegin, ArgSize, TPR); @@ -911,6 +912,7 @@ sizeof(void *), AsyncInfo); if (Ret != OFFLOAD_SUCCESS) REPORT("Copying data to device failed.\n"); + ++Itr; return Ret; }; applyToShadowMapEntries(Device, CB, HstPtrBegin, ArgSize, TPR);