Hi! On 2020-01-17T12:18:18-0800, Julian Brown wrote: > This patch series provides fixes for some cases of mixing static and (It's "structured", not "static".) ;-) > dynamic data lifetimes in OpenACC, hopefully addressing some of Thomas's > concerns in PR92843 -- in particular that an "exit data"-type operation on > a given variable inside a structured block (also mapping that variable) > should be a no-op. > > On further investigation of related patterns, other cases of mixing static > and dynamic lifetimes also turn out to problematic at present. Some of > these cases are handled by this patch series, and others are diagnosed > as errors (rather than allowing silent and hard-to-diagnose failures > later during runtime). > > The first two patches are sufficient to fix the test case introduced > for PR92843, and the third patch provides further support/diagnostics > for dynamic unmapping operations taking place within structured blocks. > > Further commentary provided alongside individual patches. Tested with > offloading to NVPTX, also with a version of my refcount-verification patch > (not currently on trunk). > > I believe this (at least the first two parts) fixes a regression (for > the pr92843-1.c test case), so OK for stage 4? Thanks for your continued work here. The code changes will need further review and discussion, but the thing is: the test cases you provided already PASS now (on master branch, and also on releases/gcc-9 branch, which is the first branch to implement these semantics), so I now already pushed these test cases to master branch in commit be9862dd96945772ae0692bc95b37ec6dbcabda0 "Test cases for mixed structured/dynamic data lifetimes with OpenACC [PR92843]", and to releases/gcc-9 branch in commit 3c7a476c5ad3761cb5373f8c59a92e04525c5638 "Test cases for mixed structured/dynamic data lifetimes with OpenACC [PR92843]", see attached. (That's with all XFAILs removed, meaning that the XFAILs will need to be re-instantiated with the code changes that actually break the respective functionality.) Grüße Thomas ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter