[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
This commit is contained in:
peter klausler 2021-10-21 12:47:46 -07:00
parent fbb020fb48
commit f6aac0dd4d
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ template <TypeCategory RCAT, int RKIND> struct DotProduct {
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);
}