[flang-commits] [PATCH] D155976: [flang][runtime] Fix NORM2([negative, ...])
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Jul 21 14:57:56 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb7585c75eeaf: [flang][runtime] Fix NORM2([negative, ...]) (authored by klausler).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155976/new/
https://reviews.llvm.org/D155976
Files:
flang/runtime/extrema.cpp
Index: flang/runtime/extrema.cpp
===================================================================
--- flang/runtime/extrema.cpp
+++ flang/runtime/extrema.cpp
@@ -800,7 +800,7 @@
bool Accumulate(Type x) {
auto absX{std::abs(static_cast<AccumType>(x))};
if (!max_) {
- max_ = x;
+ max_ = absX;
} else if (absX > max_) {
auto t{max_ / absX}; // < 1.0
auto tsq{t * t};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155976.543087.patch
Type: text/x-patch
Size: 410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230721/ec14eaf3/attachment-0001.bin>
More information about the flang-commits
mailing list