[flang] Fix DOT_PRODUCT for logical
A build-time check in a template class instantiation was applying
a test that's meaningful only for numeric types.
Differential Revision: https://reviews.llvm.org/D112345
GitOrigin-RevId: f6aac0dd4d130a41785fd320fb66377631557f6c
diff --git a/runtime/dot-product.cpp b/runtime/dot-product.cpp
index 4b80297..4b28732 100644
--- a/runtime/dot-product.cpp
+++ b/runtime/dot-product.cpp
@@ -111,7 +111,7 @@
if constexpr (constexpr auto resultType{
GetResultType(XCAT, XKIND, YCAT, YKIND)}) {
if constexpr (resultType->first == RCAT &&
- resultType->second <= RKIND) {
+ (resultType->second <= RKIND || RCAT == TypeCategory::Logical)) {
return DoDotProduct<RCAT, RKIND, CppTypeFor<XCAT, XKIND>,
CppTypeFor<YCAT, YKIND>>(x, y, terminator);
}