[libc-commits] [libc] [flang] Make proc characterization error conditional for generics (#89429) (PR #89826)

Roland McGrath via libc-commits libc-commits at lists.llvm.org
Tue Apr 23 13:48:09 PDT 2024


https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/89826

When the characteristics of a procedure depend on a procedure that
hasn't yet been defined, the compiler currently emits an unconditional
error message. This includes the case of a procedure whose
characteristics depend, perhaps indirectly, on itself. However, in the
case where the characteristics of a procedure are needed to resolve a
generic, we should not emit an error for a hitherto undefined procedure
-- either the call will resolve to another specific procedure, in which
case the error is spurious, or it won't, and then an error will issue
anyway.

Fixes https://github.com/llvm/llvm-project/issues/88677.

>From 1025cd0cb8a9b36b84ca9cbd866189fed69bd869 Mon Sep 17 00:00:00 2001
From: Roland McGrath <mcgrathr at google.com>
Date: Tue, 23 Apr 2024 13:46:49 -0700
Subject: [PATCH] [libc] Fix aarch64 build error in FEnvSafeTest change

---
 libc/test/UnitTest/FEnvSafeTest.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/test/UnitTest/FEnvSafeTest.cpp b/libc/test/UnitTest/FEnvSafeTest.cpp
index 43aebc3f36e7b3..905aa928937387 100644
--- a/libc/test/UnitTest/FEnvSafeTest.cpp
+++ b/libc/test/UnitTest/FEnvSafeTest.cpp
@@ -36,7 +36,7 @@ void FEnvSafeTest::set_fenv(const fenv_t &fenv) {
 void FEnvSafeTest::expect_fenv_eq(const fenv_t &before_fenv,
                                   const fenv_t &after_fenv) {
 #if defined(LIBC_TARGET_ARCH_IS_AARCH64)
-  using LIBC_NAMESPACE::fputil::FEnv::FPState;
+  using FPState = LIBC_NAMESPACE::fputil::FEnv::FPState;
   const FPState &before_state = reinterpret_cast<const FPState &>(before_fenv);
   const FPState &after_state = reinterpret_cast<const FPState &>(after_fenv);
 



More information about the libc-commits mailing list