[PATCH] D90184: [flang][openacc] Semantic check for cache directive
Kiran Chandramohan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 24 11:13:26 PST 2020
kiranchandramohan added inline comments.
================
Comment at: flang/lib/Semantics/resolve-directives.cpp:440-450
+ const evaluate::DataRef dataRef{*(name.symbol)};
+ return std::visit(
+ common::visitors{
+ [](const evaluate::SymbolRef &ref) { return ref->Rank() > 0; },
+ [](const evaluate::ArrayRef &aref) {
+ return aref.base().IsSymbol() ||
+ aref.base().GetComponent().base().Rank() == 0;
----------------
#just-saying: It will be useful if there is some general guidelines on when to use evaluate::DataRef.
================
Comment at: flang/test/Semantics/acc-clause-validity.f90:499
+ !$acc cache(t%arr)
+
+ !ERROR: Only array element or subarray are allowed in CACHE directive
----------------
Can you add one more test with arr(1:5)%s?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90184/new/
https://reviews.llvm.org/D90184
More information about the llvm-commits
mailing list