Index: clang/lib/AST/ASTContext.cpp =================================================================== --- clang/lib/AST/ASTContext.cpp +++ clang/lib/AST/ASTContext.cpp @@ -9566,7 +9566,7 @@ unsigned EltSize = Context.getTypeSize(Info.ElementType); unsigned MinElts = Info.EC.getKnownMinValue(); - return VScale->first * MinElts * EltSize; + return VScale->first * static_cast(MinElts) * EltSize; } bool ASTContext::areCompatibleRVVTypes(QualType FirstType,