[flang-commits] [flang] [flang][OpenMP][Semantics] resolve objects in the flush arg list (PR #139522)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Mon May 12 08:04:08 PDT 2025
================
@@ -409,6 +409,19 @@ class OmpAttributeVisitor : DirectiveAttributeVisitor<llvm::omp::Directive> {
}
void Post(const parser::OpenMPDepobjConstruct &) { PopContext(); }
+ bool Pre(const parser::OpenMPFlushConstruct &x) {
+ PushContext(x.source, llvm::omp::Directive::OMPD_flush);
+ for (auto &arg : x.v.Arguments().v) {
+ if (auto *locator{std::get_if<parser::OmpLocator>(&arg.u)}) {
+ if (auto *object{std::get_if<parser::OmpObject>(&locator->u)}) {
+ ResolveOmpObject(*object, Symbol::Flag::OmpDependObject);
----------------
kiranchandramohan wrote:
If common blocks are not handled in `ResolveName` then you can probably use `OmpFlushed` as the Symbol in `ResolveOmpObject`.
https://github.com/llvm/llvm-project/pull/139522
More information about the flang-commits
mailing list