diff --git a/flang/include/flang/Semantics/semantics.h b/flang/include/flang/Semantics/semantics.h --- a/flang/include/flang/Semantics/semantics.h +++ b/flang/include/flang/Semantics/semantics.h @@ -144,14 +144,6 @@ return *this; } - bool anyDefinedIntrinsicOperator() const { - return anyDefinedIntrinsicOperator_; - } - SemanticsContext &set_anyDefinedIntrinsicOperator(bool yes = true) { - anyDefinedIntrinsicOperator_ = yes; - return *this; - } - const DeclTypeSpec &MakeNumericType(TypeCategory, int kind = 0); const DeclTypeSpec &MakeLogicalType(int kind = 0); @@ -286,7 +278,6 @@ const Scope *ppcBuiltinsScope_{nullptr}; // module __ppc_intrinsics std::list modFileParseTrees_; std::unique_ptr commonBlockMap_; - bool anyDefinedIntrinsicOperator_{false}; }; class Semantics { diff --git a/flang/lib/Semantics/expression.cpp b/flang/lib/Semantics/expression.cpp --- a/flang/lib/Semantics/expression.cpp +++ b/flang/lib/Semantics/expression.cpp @@ -3584,7 +3584,7 @@ if (expr.typedExpr) { return expr.typedExpr->v; } - if (!wasIterativelyAnalyzing && !context_.anyDefinedIntrinsicOperator()) { + if (!wasIterativelyAnalyzing) { iterativelyAnalyzingSubexpressions_ = true; result = IterativelyAnalyzeSubexpressions(expr); } diff --git a/flang/lib/Semantics/resolve-names.cpp b/flang/lib/Semantics/resolve-names.cpp --- a/flang/lib/Semantics/resolve-names.cpp +++ b/flang/lib/Semantics/resolve-names.cpp @@ -3269,11 +3269,6 @@ if (auto *symbol{FindInScope(GenericSpecInfo{x}.symbolName())}) { SetGenericSymbol(*symbol); } - if (const auto *opr{std::get_if(&x.u)}; opr && - std::holds_alternative( - opr->u)) { - context().set_anyDefinedIntrinsicOperator(true); - } return false; }