[flang-commits] [PATCH] D124401: [flang] Accept "INFINITY" as real input
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Apr 25 12:12:31 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb8f5cf9d2c56: [flang] Accept "INFINITY" as real input (authored by klausler).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124401/new/
https://reviews.llvm.org/D124401
Files:
flang/lib/Decimal/decimal-to-binary.cpp
Index: flang/lib/Decimal/decimal-to-binary.cpp
===================================================================
--- flang/lib/Decimal/decimal-to-binary.cpp
+++ flang/lib/Decimal/decimal-to-binary.cpp
@@ -439,7 +439,13 @@
}
if ((!limit || limit >= q + 3) && toupper(q[0]) == 'I' &&
toupper(q[1]) == 'N' && toupper(q[2]) == 'F') {
- p = q + 3;
+ if ((!limit || limit >= q + 8) && toupper(q[3]) == 'I' &&
+ toupper(q[4]) == 'N' && toupper(q[5]) == 'I' &&
+ toupper(q[6]) == 'T' && toupper(q[7]) == 'Y') {
+ p = q + 8;
+ } else {
+ p = q + 3;
+ }
return {Real{Infinity()}};
} else {
// Invalid input
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124401.424994.patch
Type: text/x-patch
Size: 717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220425/f4da8305/attachment.bin>
More information about the flang-commits
mailing list