diff options
| -rw-r--r-- | openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu index 6e1548b703d..2125c36e1d8 100644 --- a/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu +++ b/openmp/libomptarget/deviceRTLs/nvptx/src/data_sharing.cu @@ -477,13 +477,13 @@ EXTERN void __kmpc_data_sharing_pop_stack(void *FrameStart) {      // Pointer to next available stack.      void *&StackP = DataSharingState.StackPtr[WID]; +    // Pop the frame. +    StackP = FrameStart; +      // If the current slot is empty, we need to free the slot after the      // pop.      bool SlotEmpty = (StackP == &SlotP->Data[0]); -    // Pop the frame. -    StackP = FrameStart; -      if (SlotEmpty && SlotP->Prev) {        // Before removing the slot we need to reset StackP.        StackP = SlotP->PrevSlotStackPtr;  | 

