[PATCH] D64585: [OpenMP] With nested parallelism, threadprivate variables become shared on outer parallel when appearing in inner parallel copyin clause

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 13:34:41 PDT 2019


ABataev added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:15329
 
+    if (getLangOpts().OpenMP && getLangOpts().OpenMPUseTLS) {
+      // Avoid capturing TLS-backed threadprivate variables in outer scopes.
----------------
Prince781 wrote:
> ABataev wrote:
> > this is not the right place to fix this bug, it must be fixed in SemaOpenMP.cpp. If you want, I can try to fix it.
> I see. Thanks for your comment. I noticed elsewhere in this function `tryCaptureVariable` that there is a `if (getLangOpts().OpenMP) ...`, so I thought it would be okay.
> 
> If you don't mind, I wish to take another look at this and get back to you later.
Ok, no problems


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64585/new/

https://reviews.llvm.org/D64585





More information about the cfe-commits mailing list