[flang-commits] [flang] [llvm] [flang] Support REAL(16) through glibc's *f128 entry points (PR #219698)

via flang-commits flang-commits at lists.llvm.org
Sat Aug 29 09:45:57 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- flang-rt/lib/quadmath/complex-math.h flang-rt/lib/quadmath/math-entries.h flang/include/flang/Tools/TargetSetup.h flang/lib/Evaluate/host.h flang/lib/Evaluate/intrinsics-library.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/flang-rt/lib/quadmath/math-entries.h b/flang-rt/lib/quadmath/math-entries.h
index 28faa202d..f4d98ffb6 100644
--- a/flang-rt/lib/quadmath/math-entries.h
+++ b/flang-rt/lib/quadmath/math-entries.h
@@ -246,9 +246,8 @@ DEFINE_SIMPLE_ALIAS(Yn, ynl)
 // aliases below would resolve to nothing and the failure would surface at link
 // time or in the field. This makes it surface at the line that owns the
 // assumption.
-[[maybe_unused]] static CppTypeFor<TypeCategory::Real, 16> (
-    *const f128_prototype_canary)(CppTypeFor<TypeCategory::Real, 16>) =
-    &sqrtf128;
+[[maybe_unused]] static CppTypeFor<TypeCategory::Real, 16> (*const
+        f128_prototype_canary)(CppTypeFor<TypeCategory::Real, 16>) = &sqrtf128;
 
 DEFINE_SIMPLE_ALIAS(Abs, fabsf128)
 DEFINE_SIMPLE_ALIAS(Acos, acosf128)
diff --git a/flang/lib/Evaluate/intrinsics-library.cpp b/flang/lib/Evaluate/intrinsics-library.cpp
index 2572d361d..919e2da3d 100644
--- a/flang/lib/Evaluate/intrinsics-library.cpp
+++ b/flang/lib/Evaluate/intrinsics-library.cpp
@@ -640,9 +640,11 @@ host::HostComplex128 csqrtf128(host::HostComplex128);
 host::HostComplex128 ctanf128(host::HostComplex128);
 host::HostComplex128 ctanhf128(host::HostComplex128);
 }
-template <> struct HostRuntimeLibrary<host::HostComplex128, LibraryVersion::Libm> {
+template <>
+struct HostRuntimeLibrary<host::HostComplex128, LibraryVersion::Libm> {
   using F = FuncPointer<host::HostComplex128, host::HostComplex128>;
-  using F2 = FuncPointer<host::HostComplex128, host::HostComplex128, host::HostComplex128>;
+  using F2 = FuncPointer<host::HostComplex128, host::HostComplex128,
+      host::HostComplex128>;
   static constexpr HostRuntimeFunction table[]{
       FolderFactory<F, F{cacosf128}>::Create("acos"),
       FolderFactory<F, F{cacoshf128}>::Create("acosh"),

``````````

</details>


https://github.com/llvm/llvm-project/pull/219698


More information about the flang-commits mailing list