[flang-commits] [PATCH] D124303: [flang][runtime] Fix total MAXLOC/MINLOC for non-integer data
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Apr 22 14:32:55 PDT 2022
klausler created this revision.
klausler added a reviewer: mleair.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
klausler requested review of this revision.
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.
https://reviews.llvm.org/D124303
Files:
flang/runtime/extrema.cpp
Index: flang/runtime/extrema.cpp
===================================================================
--- flang/runtime/extrema.cpp
+++ flang/runtime/extrema.cpp
@@ -132,7 +132,7 @@
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);
}
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124303.424615.patch
Type: text/x-patch
Size: 578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220422/76ba2f16/attachment.bin>
More information about the flang-commits
mailing list