[flang-commits] [flang] [flang][semantics][OpenMP] no privatisation of stmt functions (PR #106550)
Leandro Lupori via flang-commits
flang-commits at lists.llvm.org
Wed Oct 2 09:55:59 PDT 2024
================
@@ -2750,6 +2750,14 @@ void OmpAttributeVisitor::CheckObjectInNamelistOrAssociate(
"Variable '%s' in ASSOCIATE cannot be in a %s clause"_err_en_US,
name.ToString(), clauseName.str());
}
+
+ if (stmtFunctionExprSymbols_.find(ultimateSymbol) !=
+ stmtFunctionExprSymbols_.end()) {
+ context_.Say(name.source,
+ "Variable '%s' in statement function expression cannot be in a "
+ "%s clause"_err_en_US,
+ name.ToString(), clauseName.str());
+ }
----------------
luporl wrote:
It would be better to change the name of this member function, to something like `CheckObjectIsPrivatizable`, now that it also checks for statement functions.
https://github.com/llvm/llvm-project/pull/106550
More information about the flang-commits
mailing list