[flang-commits] [flang] [flang][Semantics] Check defined-operator purity at the use site (PR #229976)
via flang-commits
flang-commits at lists.llvm.org
Thu Oct 15 04:37:01 PDT 2026
================
@@ -4369,11 +4369,17 @@ MaybeExpr ExpressionAnalyzer::Analyze(const parser::Expr::Concat &x) {
// Otherwise report the error in messages.
MaybeExpr ExpressionAnalyzer::AnalyzeDefinedOp(const parser::Name &name,
ActualArguments &&actuals, const Symbol *&symbol) {
+ // Reference checks such as F2018 C1595 (a procedure referenced in a
+ // pure subprogram must be pure) must be applied at the use site
+ parser::CharBlock callSite{GetContextualMessages().at()};
+ if (callSite.empty()) {
+ callSite = name.source;
+ }
----------------
shivaramaarao wrote:
Thank you. Updated the changes accordingly.
https://github.com/llvm/llvm-project/pull/229976
More information about the flang-commits
mailing list