[flang][runtime] Fix total MAXLOC/MINLOC for non-integer data

A template argument was hard-coded as the Integer type category
rather than properly forwarding the type category of the data for
type-specific instantiations of total (no DIM=) MAXLOC and MINLOC.
This broke total MAXLOC and MINLOC reductions for real and character
data.

Differential Revision: https://reviews.llvm.org/D124303
This commit is contained in:
Peter Klausler 2022-04-20 15:58:43 -07:00
parent 5c90ecae2d
commit 2c272a4e8f
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ template <TypeCategory CAT, bool IS_MAX> struct TypedMaxOrMinLocHelper {
void operator()(const char *intrinsic, Descriptor &result,
const Descriptor &x, int kind, const char *source, int line,
const Descriptor *mask, bool back) const {
DoMaxOrMinLoc<TypeCategory::Integer, KIND, IS_MAX, NumericCompare>(
DoMaxOrMinLoc<CAT, KIND, IS_MAX, NumericCompare>(
intrinsic, result, x, kind, source, line, mask, back);
}
};