forked from OSchip/llvm-project
[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:
parent
5c90ecae2d
commit
2c272a4e8f
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue