[PATCH] D110714: [Flang][openmp] Added semantic checks for atomic construct

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 11 14:42:19 PDT 2021


kiranchandramohan requested changes to this revision.
kiranchandramohan added a comment.
This revision now requires changes to proceed.

Can the title of the patch be changed to "Semantic checks for atomic construct with update clause"?



================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:1226
+      context_.Say(variable.GetSource(),
+          "Variable name mismatch on lvalue and rvalue"_err_en_US);
+    }
----------------
I think lvalue, rvalue are not commonly used terms in Fortran. Also, is this applicable for update atomic only? Is that enforced?

A possible error message could be something like the following,
Atomic update variable <var-name> not found in the RHS of the assignment statement in an ATOMIC UPDATE construct.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:1238
+template <typename T>
+void OmpStructureChecker::CheckAtomicConstructStructure(T &construct) {
+  const auto &dir{std::get<parser::Verbatim>(construct.t)};
----------------
Is the template required here? Can you pass the AssignmentStatement instead here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110714



More information about the llvm-commits mailing list