[flang-commits] [flang] [flang][semantics][OpenMP] no privatisation of stmt functions (PR #106550)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Thu Aug 29 06:56:05 PDT 2024


================
@@ -2721,6 +2721,14 @@ void OmpAttributeVisitor::CheckObjectInNamelist(
         "Variable '%s' in NAMELIST 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 "
----------------
klausler wrote:

"statement function" isn't literal Fortran syntax, don't capitali[sz]e things that are not keywords.

And please don't break error message strings across multiple lines -- that makes it much more difficult to find them with grep.

https://github.com/llvm/llvm-project/pull/106550


More information about the flang-commits mailing list