[flang-commits] [flang] [flang] Fix preprocessor expression for selecting 10 byte REALs (PR #106087)
via flang-commits
flang-commits at lists.llvm.org
Mon Aug 26 08:04:46 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-runtime
Author: Pete Steinfeld (psteinfeld)
<details>
<summary>Changes</summary>
The extra "defined" was causing the overall expression to incorrectly evaluate to false.
---
Full diff: https://github.com/llvm/llvm-project/pull/106087.diff
1 Files Affected:
- (modified) flang/runtime/numeric.cpp (+1-1)
``````````diff
diff --git a/flang/runtime/numeric.cpp b/flang/runtime/numeric.cpp
index 40bacf07157a27..9d6de7a9c17d91 100644
--- a/flang/runtime/numeric.cpp
+++ b/flang/runtime/numeric.cpp
@@ -147,7 +147,7 @@ inline RT_API_ATTRS CppTypeFor<TypeCategory::Integer, 4> SelectedRealKind(
#else
constexpr bool hasReal3{false};
#endif
-#if defined LDBL_MANT_DIG == 64 && !defined FLANG_RUNTIME_NO_REAL_10
+#if LDBL_MANT_DIG == 64 && !defined FLANG_RUNTIME_NO_REAL_10
constexpr bool hasReal10{true};
#else
constexpr bool hasReal10{false};
``````````
</details>
https://github.com/llvm/llvm-project/pull/106087
More information about the flang-commits
mailing list