On Fri, Mar 01, 2024 at 05:19:29PM +0100, Tobias Burnus wrote: > Jakub Jelinek wrote: > > As discussed on IRC, I believe not disregarding the capture proxies in > > target regions if they shouldn't be shared is always wrong, but also the > > gimplify.cc suggestion was incorrect. > > > > The thing is that at the place where the omp_disregard_value_expr call > > is done currently for target region flags is always in_code ? GOVD_SEEN : 0 > > so by testing flags & anything we actually don't differentiate between > > privatized vars and mapped vars. So, it needs to be moved after we > > actually compute the flags, similarly how we do it for non-target. > ... > > I have now added Jakub's updated the gimplify.cc patch, renamed the test > files, added the proposed lambda test case as well, did add a missing line > break, and updated the target-lambda-1.C to also work with shared memory. > > I think the patch should be good, having testing it with offloading here and > Jakub also testing it on his side. > > Final comments, suggestions, remarks?
LGTM, thanks. Just please mention those FIXMEs somewhere in PR113436, so that when that bug is fixed we don't remember to remove those #if 0s. Jakub