From 2c272a4e8f9dc9acca3f15bb0327e329941dc3ff Mon Sep 17 00:00:00 2001 From: Peter Klausler Date: Wed, 20 Apr 2022 15:58:43 -0700 Subject: [PATCH] [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 --- flang/runtime/extrema.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang/runtime/extrema.cpp b/flang/runtime/extrema.cpp index c68caec..9eb438b 100644 --- a/flang/runtime/extrema.cpp +++ b/flang/runtime/extrema.cpp @@ -132,7 +132,7 @@ template 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( + DoMaxOrMinLoc( intrinsic, result, x, kind, source, line, mask, back); } }; -- 2.7.4