[OpenMP][Offloading] Fix infinite loop in applyToShadowMapEntries
authorShilei Tian <i@tianshilei.me>
Sun, 13 Feb 2022 03:02:47 +0000 (22:02 -0500)
committerShilei Tian <i@tianshilei.me>
Sun, 13 Feb 2022 03:02:53 +0000 (22:02 -0500)
commitc27f530d4c6306b2010306131f66e771d6a66594
tree1331c7e8fbd323a30ee2d38d4bd30f268e54c0c6
parent2aa732a9183b8fa23c103c169a5da0e90cc67cf5
[OpenMP][Offloading] Fix infinite loop in applyToShadowMapEntries

This patch fixes the issue that the for loop in `applyToShadowMapEntries`
is infinite because `Itr` is not incremented in `CB`. Fixes #53727.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D119471
openmp/libomptarget/src/omptarget.cpp
openmp/libomptarget/test/offloading/bug53727.cpp [new file with mode: 0644]