[flang-commits] [flang] [flang] Match argument types for std::min (PR #71102)

via flang-commits flang-commits at lists.llvm.org
Mon Nov 6 07:35:01 PST 2023


================
@@ -910,7 +910,9 @@ template <typename T> Expr<T> Folder<T>::RESHAPE(FunctionRef<T> &&funcRef) {
                 : pad->Reshape(std::move(shape.value()))};
         ConstantSubscripts subscripts{result.lbounds()};
         auto copied{result.CopyFrom(*source,
-            std::min(source->size(), resultElements), subscripts, dimOrderPtr)};
+            std::min(static_cast<decltype(resultElements)>(source->size()),
----------------
kkwli wrote:

It makes sense. I will change it.

https://github.com/llvm/llvm-project/pull/71102


More information about the flang-commits mailing list