--- a/flang/lib/Evaluate/fold-logical.cpp +++ b/flang/lib/Evaluate/fold-logical.cpp @@ -255,7 +255,7 @@ const auto &xConst{DEREF(UnwrapExpr>(x))}; for (const auto &elt : xConst.values()) { result->emplace_back( - Scalar::template FromInteger(elt).flags.test( + Scalar::FromInteger(elt).flags.test( RealFlag::Overflow)); } }, @@ -272,7 +272,7 @@ const auto &xConst{DEREF(UnwrapExpr>(x))}; for (const auto &elt : xConst.values()) { result->emplace_back(elt.IsFinite() && - Scalar::template Convert(elt).flags.test( + Scalar::Convert(elt).flags.test( RealFlag::Overflow)); } }, @@ -291,7 +291,7 @@ const auto &xConst{DEREF(UnwrapExpr>(x))}; for (const auto &elt : xConst.values()) { result->emplace_back( - Scalar::template ConvertSigned(elt).overflow); + Scalar::ConvertSigned(elt).overflow); } }, intMold->u, xInt->u); --- a/flang/lib/Evaluate/fold-real.cpp +++ b/flang/lib/Evaluate/fold-real.cpp @@ -355,13 +355,7 @@ std::move(funcRef), ScalarFunc( [&](const Scalar &x, const Scalar &y) -> Scalar { - ValueWithRealFlags> result{x. -// MSVC chokes on the keyword "template" here in a call to a -// member function template. -#ifndef _MSC_VER - template -#endif - SCALE(y)}; + ValueWithRealFlags> result{x.SCALE(y)}; if (result.flags.test(RealFlag::Overflow)) { context.messages().Say( "SCALE intrinsic folding overflow"_warn_en_US);