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

Princeton Ferro via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 13:33:14 PDT 2019


Prince781 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.
----------------
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.


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