[PATCH] D93213: [Flang] [OpenMP] Add semantic check for OpenMP private ,firstprivate and lastprivate clauses

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 1 10:52:34 PDT 2021


kiranchandramohan added inline comments.


================
Comment at: flang/lib/Semantics/resolve-directives.cpp:237
+    const auto &parsedExpr{std::get<parser::Scalar<parser::Expr>>(x.t)};
+    if (const auto *expr{GetExpr(parsedExpr)}) {
+      for (const Symbol &symbol : evaluate::CollectSymbols(*expr)) {
----------------
We have an ordering issue here. OmpAttributeVisitor (this class) is called as part of resolvenames which happens before the parse-tree rewrite. Problem is that before the parse-tree rewrite there are array expressions which are mis-parsed as statement functions. So this function will be called on a lot of statement functions which are not actually statement functions and can cause problems.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93213



More information about the llvm-commits mailing list