diff --git a/flang/lib/Semantics/check-call.cpp b/flang/lib/Semantics/check-call.cpp index 3a31dba64eefe..4d2a118596e17 100644 --- a/flang/lib/Semantics/check-call.cpp +++ b/flang/lib/Semantics/check-call.cpp @@ -1231,7 +1231,7 @@ bool CheckInterfaceForGeneric(const characteristics::Procedure &proc, bool CheckArgumentIsConstantExprInRange( const evaluate::ActualArguments &actuals, int index, int lowerBound, int upperBound, parser::ContextualMessages &messages) { - CHECK(index >= 0 && index < actuals.size()); + CHECK(index >= 0 && static_cast(index) < actuals.size()); const std::optional &argOptional{actuals[index]}; if (!argOptional) {