diff --git a/flang/lib/Evaluate/fold-integer.cpp b/flang/lib/Evaluate/fold-integer.cpp index 09b2f91debda2..25ae4831ab208 100644 --- a/flang/lib/Evaluate/fold-integer.cpp +++ b/flang/lib/Evaluate/fold-integer.cpp @@ -704,6 +704,7 @@ Expr> FoldIntrinsicFunction( return common::visit( [&funcRef, &context, &FromInt64](const auto &str) -> Expr { using Char = typename std::decay_t::Result; + (void)FromInt64; return FoldElementalIntrinsic(context, std::move(funcRef), ScalarFunc( @@ -719,7 +720,6 @@ Expr> FoldIntrinsicFunction( // CharacterUtils<2>::ICHAR(). Can't find a work-around, // so remove the FromInt64 error checking lambda that // seems to have caused the proble. - (void)FromInt64; [](const Scalar &c) { return CharacterUtils::ICHAR( CharacterUtils::Resize(c, 1));