[flang-commits] [flang] [Flang OpenMP] Add semantics checks for cray pointer usage in DSA list (PR #121028)
Michael Klemm via flang-commits
flang-commits at lists.llvm.org
Sun Jan 12 08:14:33 PST 2025
================
@@ -4522,6 +4525,22 @@ void OmpStructureChecker::CheckProcedurePointer(
}
}
+void OmpStructureChecker::CheckCrayPointee(
+ const parser::OmpObjectList &objectList, llvm::StringRef clause) {
+ SymbolSourceMap symbols;
+ GetSymbolsInObjectList(objectList, symbols);
+ for (auto it{symbols.begin()}; it != symbols.end(); ++it) {
+ const auto *symbol{it->first};
+ const auto source{it->second};
+ if (symbol->test(Symbol::Flag::CrayPointee)) {
+ context_.Say(source,
+ "Cray Pointee '%s' may not appear in %s clause, use Cray Pointer '%s' instead"_err_en_US,
+ symbol->name(), clause.str(),
+ semantics::GetCrayPointer(*symbol).name());
----------------
mjklemm wrote:
The OpenMP specification is ambiguous on this. Let's do it this way and see if application users will complain about this. :-)
https://github.com/llvm/llvm-project/pull/121028
More information about the flang-commits
mailing list