Skip to content

[libc] Provide isnan, isnanf and isnanl functions #96008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 10, 2024

Conversation

petrhosek
Copy link
Member

While C99 defines type generic isnan macro, BSD provided isnan, isnanf and isnanl in prior C standards and existing code still relies on these.

@llvmbot
Copy link
Member

llvmbot commented Jun 18, 2024

@llvm/pr-subscribers-libc

Author: Petr Hosek (petrhosek)

Changes

While C99 defines type generic isnan macro, BSD provided isnan, isnanf and isnanl in prior C standards and existing code still relies on these.


Full diff: https://github.com/llvm/llvm-project/pull/96008.diff

13 Files Affected:

  • (modified) libc/config/baremetal/arm/entrypoints.txt (+3)
  • (modified) libc/config/baremetal/riscv/entrypoints.txt (+3)
  • (modified) libc/include/llvm-libc-macros/math-macros.h (-1)
  • (modified) libc/include/math.h.def (+2)
  • (modified) libc/spec/bsd_ext.td (+13)
  • (modified) libc/src/math/CMakeLists.txt (+4)
  • (modified) libc/src/math/generic/CMakeLists.txt (+30)
  • (added) libc/src/math/generic/isnan.cpp (+18)
  • (added) libc/src/math/generic/isnanf.cpp (+18)
  • (added) libc/src/math/generic/isnanl.cpp (+18)
  • (added) libc/src/math/isnan.h (+18)
  • (added) libc/src/math/isnanf.h (+18)
  • (added) libc/src/math/isnanl.h (+18)
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index 7fb82c60a1bb8..9e6999fccc1ed 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -261,6 +261,9 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.ilogb
     libc.src.math.ilogbf
     libc.src.math.ilogbl
+    libc.src.math.isnan
+    libc.src.math.isnanf
+    libc.src.math.isnanl
     libc.src.math.ldexp
     libc.src.math.ldexpf
     libc.src.math.ldexpl
diff --git a/libc/config/baremetal/riscv/entrypoints.txt b/libc/config/baremetal/riscv/entrypoints.txt
index b769b43f03a2c..dffc6af88929e 100644
--- a/libc/config/baremetal/riscv/entrypoints.txt
+++ b/libc/config/baremetal/riscv/entrypoints.txt
@@ -260,6 +260,9 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.math.ilogb
     libc.src.math.ilogbf
     libc.src.math.ilogbl
+    libc.src.math.isnan
+    libc.src.math.isnanf
+    libc.src.math.isnanl
     libc.src.math.ldexp
     libc.src.math.ldexpf
     libc.src.math.ldexpl
diff --git a/libc/include/llvm-libc-macros/math-macros.h b/libc/include/llvm-libc-macros/math-macros.h
index 47838969d59ae..30e826e769306 100644
--- a/libc/include/llvm-libc-macros/math-macros.h
+++ b/libc/include/llvm-libc-macros/math-macros.h
@@ -54,6 +54,5 @@
 // TODO: Move generic functional math macros to a separate header file.
 #define isfinite(x) __builtin_isfinite(x)
 #define isinf(x) __builtin_isinf(x)
-#define isnan(x) __builtin_isnan(x)
 
 #endif // LLVM_LIBC_MACROS_MATH_MACROS_H
diff --git a/libc/include/math.h.def b/libc/include/math.h.def
index 454b8f2980514..3ec52e77856d4 100644
--- a/libc/include/math.h.def
+++ b/libc/include/math.h.def
@@ -17,4 +17,6 @@
 
 %%public_api()
 
+#define isnan(x) __builtin_isnan(x)
+
 #endif // LLVM_LIBC_MATH_H
diff --git a/libc/spec/bsd_ext.td b/libc/spec/bsd_ext.td
index 50ca8b919ff2c..4d33313521735 100644
--- a/libc/spec/bsd_ext.td
+++ b/libc/spec/bsd_ext.td
@@ -1,4 +1,16 @@
 def BsdExtensions : StandardSpec<"BSDExtensions"> {
+  HeaderSpec Math = HeaderSpec<
+      "math.h",
+      [], // Macros
+      [], // Types
+      [], // Enumerations
+      [
+          FunctionSpec<"isnan", RetValSpec<IntType>, [ArgSpec<DoubleType>]>,
+          FunctionSpec<"isnanf", RetValSpec<IntType>, [ArgSpec<FloatType>]>,
+          FunctionSpec<"isnanl", RetValSpec<IntType>, [ArgSpec<LongDoubleType>]>,
+      ]
+  >;
+
   HeaderSpec String = HeaderSpec<
       "string.h",
       [], // Macros
@@ -67,6 +79,7 @@ def BsdExtensions : StandardSpec<"BSDExtensions"> {
   >;
 
   let Headers = [
+    Math,
     String,
     Strings,
     SysWait,
diff --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt
index 4472367d6c073..ca833f3a872f4 100644
--- a/libc/src/math/CMakeLists.txt
+++ b/libc/src/math/CMakeLists.txt
@@ -219,6 +219,10 @@ add_math_entrypoint_object(ilogbl)
 add_math_entrypoint_object(ilogbf16)
 add_math_entrypoint_object(ilogbf128)
 
+add_math_entrypoint_object(isnan)
+add_math_entrypoint_object(isnanf)
+add_math_entrypoint_object(isnanl)
+
 add_math_entrypoint_object(llogb)
 add_math_entrypoint_object(llogbf)
 add_math_entrypoint_object(llogbl)
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index aa0069d821d0d..9d99879488be5 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -2684,6 +2684,36 @@ add_entrypoint_object(
     -O3
 )
 
+add_entrypoint_object(
+  isnan
+  SRCS
+    isnan.cpp
+  HDRS
+    ../isnan.h
+  COMPILE_OPTIONS
+    -O3
+)
+
+add_entrypoint_object(
+  isnanf
+  SRCS
+    isnanf.cpp
+  HDRS
+    ../isnanf.h
+  COMPILE_OPTIONS
+    -O3
+)
+
+add_entrypoint_object(
+  isnanl
+  SRCS
+    isnanl.cpp
+  HDRS
+    ../isnanl.h
+  COMPILE_OPTIONS
+    -O3
+)
+
 add_entrypoint_object(
   nan
   SRCS
diff --git a/libc/src/math/generic/isnan.cpp b/libc/src/math/generic/isnan.cpp
new file mode 100644
index 0000000000000..5406a69f68217
--- /dev/null
+++ b/libc/src/math/generic/isnan.cpp
@@ -0,0 +1,18 @@
+//===-- Implementation of isnan function ----------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/math/isnan.h"
+#include "src/__support/common.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(int, isnan, (double x)) {
+  return __builtin_isnan(x);
+}
+
+} // namespace LIBC_NAMESPACE
diff --git a/libc/src/math/generic/isnanf.cpp b/libc/src/math/generic/isnanf.cpp
new file mode 100644
index 0000000000000..2d9339360713b
--- /dev/null
+++ b/libc/src/math/generic/isnanf.cpp
@@ -0,0 +1,18 @@
+//===-- Implementation of isnanf function ---------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/math/isnanf.h"
+#include "src/__support/common.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(int, isnanf, (float x)) {
+  return __builtin_isnan(x);
+}
+
+} // namespace LIBC_NAMESPACE
diff --git a/libc/src/math/generic/isnanl.cpp b/libc/src/math/generic/isnanl.cpp
new file mode 100644
index 0000000000000..a700b636d0149
--- /dev/null
+++ b/libc/src/math/generic/isnanl.cpp
@@ -0,0 +1,18 @@
+//===-- Implementation of isnanl function ---------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/math/isnanl.h"
+#include "src/__support/common.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(int, isnanl, (long double x)) {
+  return __builtin_isnan(x);
+}
+
+} // namespace LIBC_NAMESPACE
diff --git a/libc/src/math/isnan.h b/libc/src/math/isnan.h
new file mode 100644
index 0000000000000..eda8e7eb30f39
--- /dev/null
+++ b/libc/src/math/isnan.h
@@ -0,0 +1,18 @@
+//===-- Implementation header for isnan -------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_MATH_ISNAN_H
+#define LLVM_LIBC_SRC_MATH_ISNAN_H
+
+namespace LIBC_NAMESPACE {
+
+int isnan(double x);
+
+} // namespace LIBC_NAMESPACE
+
+#endif // LLVM_LIBC_SRC_MATH_ISNAN_H
diff --git a/libc/src/math/isnanf.h b/libc/src/math/isnanf.h
new file mode 100644
index 0000000000000..a12d39ee5af97
--- /dev/null
+++ b/libc/src/math/isnanf.h
@@ -0,0 +1,18 @@
+//===-- Implementation header for isnanf ------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_MATH_ISNANF_H
+#define LLVM_LIBC_SRC_MATH_ISNANF_H
+
+namespace LIBC_NAMESPACE {
+
+int isnanf(float x);
+
+} // namespace LIBC_NAMESPACE
+
+#endif // LLVM_LIBC_SRC_MATH_ISNANF_H
diff --git a/libc/src/math/isnanl.h b/libc/src/math/isnanl.h
new file mode 100644
index 0000000000000..9fbfca03cb15e
--- /dev/null
+++ b/libc/src/math/isnanl.h
@@ -0,0 +1,18 @@
+//===-- Implementation header for isnanl ------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_MATH_ISNANL_H
+#define LLVM_LIBC_SRC_MATH_ISNANL_H
+
+namespace LIBC_NAMESPACE {
+
+int isnanl(long double x);
+
+} // namespace LIBC_NAMESPACE
+
+#endif // LLVM_LIBC_SRC_MATH_ISNANL_H

@@ -17,4 +17,6 @@

%%public_api()

#define isnan(x) __builtin_isnan(x)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we put this macro into its own header? Do you have any suggestion for the name?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible I'd like to leave this in math-macros but if it needs to be moved out then I'd say it should be defined in isnan-macro.h inside include/llvm-libc-macros/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we expect every consumer of this header to have this builtin? We could possible do if defined(__has_builtin) && __has_builtin(__builtin_isnan)) or omething.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it mean that we still define isnan macro after defining all the isnan function?

If so then I think it makes sense to do the TODO in math-macros.h, that is to move isinf, isfinite, isnan macro definitions to math-function-macros.h, including it after %%public_api in here, and commenting about the reason we have to include it after all the function definitions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we expect every consumer of this header to have this builtin?

Yes. All versions of clang and gcc that we claim to support have this builtin. Therefor, we should not guard it with __has_builtin (same for other builtins).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is to move isinf, isfinite, isnan

So isnan has isnan, isnanf, and isnanl.

isinf has isinf, isinff, isinfl,

finite has finite, finitef, finitel. Note that finite is not isfinite{f|l}, so it lacks the symmetry that isinf and isnan have. Stated another way, isfinite (the type-generic macro) does not conflict with the finite, finitef, and finitel functions (like isnan and isinf do).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For longer term maintainability I'd like to go with a design like what @lntue proposed where the primary math macros are included before %%public_api and the macros that might also be functions are defined in a separate header after.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

@nickdesaulniers nickdesaulniers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnanf and isnanl LGTM.

But I think we may need to be more careful here with isnan.

isnan is generally a macro or a function? That needs to be explored more carefully I think.

cc @enh-google @frobtech for folks that might understand this problem better.

@enh-google
Copy link
Contributor

isnan is generally a macro or a function? That needs to be explored more carefully I think.

a macro, because realistically you want this to just be an inlined instruction or two via __builtin_isnan(). the c standard even explicitly says "7.12.3.5 The isnan macro" :-)

(callers that want the function [on systems where it exists] need to use the (isnan) trick. bionic and glibc do both provide a real function in addition to the macro, but iOS/macOS and musl don't.)

@petrhosek
Copy link
Member Author

C standard introduced isnan as a macro in C99, but it has been provided as a function long before that, originally by BSD but it was also adopted by glibc etc. It's fine to define both as long as the macro is defined after the function which is what glibc, bionic and newlib do. I'm inclined to do the same for backwards compatibility.

@nickdesaulniers
Copy link
Member

Got it, thanks for the context @enh-google . In that case, @petrhosek please add tests, but for isnan it sounds like we should test the function AND the macro?

@@ -260,6 +260,9 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.ilogb
libc.src.math.ilogbf
libc.src.math.ilogbl
libc.src.math.isnan
libc.src.math.isnanf
libc.src.math.isnanl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't test baremetal continuously; please add these entrypoints to at least libc/config/linux/x86_64/entrypoints.txt, if not the rest of the linux targets.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@enh-google
Copy link
Contributor

C standard introduced isnan as a macro in C99, but it has been provided as a function long before that, originally by BSD but it was also adopted by glibc etc. It's fine to define both as long as the macro is defined after the function which is what glibc, bionic and newlib do. I'm inclined to do the same for backwards compatibility.

strictly, i don't think any of them (except bionic, for isnan() and isinf() only, not the f or l variants[1]) declare the functions at all. there are just secret definitions, for backwards compatibility with a time when their macro turned into a call to one of the three (well, six) __is*() functions.


  1. and that seems like a mistake that i should fix by deletion.

@enh-google
Copy link
Contributor

(for completeness, i looked at FreeBSD/NetBSD/OpenBSD, and see that -- unsurprisingly, like macOS -- FreeBSD doesn't declare any of these functions, but NetBSD+OpenBSD both have declarations for isnanf()/isinff() [but not isnanl()/isinfl()].)

@enh-google
Copy link
Contributor

and glibc does have all the declarations --- it just hides them behind macros that declare functions :-)

hubot pushed a commit to aosp-mirror/platform_bionic that referenced this pull request Jun 21, 2024
isnan() and isinf() are type-generic macros, not usually declared as functions. Remove the function declarations and the big comment talking about how we shouldn't expose them.

isnanl() and isinfl() are exposed as functions by glibc (but not the BSDs), and we've always had the definitions, so we can increase source compatibility there trivially.

See the discussion on llvm/llvm-project#96008 for more background.

Change-Id: I798153f710794870bb4864f2ae8b98147f9d8763
While C99 defines type generic isnan macro, BSD provided isnan, isnanf
and isnanl in prior C standards and existing code still relies on these.
Copy link

github-actions bot commented Jul 3, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@lntue
Copy link
Contributor

lntue commented Jul 3, 2024

Please fix formatting.

@petrhosek petrhosek merged commit b6e41c1 into llvm:main Jul 10, 2024
4 of 5 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 10, 2024

LLVM Buildbot has detected a new failure on builder libc-aarch64-ubuntu-fullbuild-dbg running on libc-aarch64-ubuntu while building libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/71/builds/1776

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[ RUN      ] LlvmLibcMemSizeTest.Multiplication
[       OK ] LlvmLibcMemSizeTest.Multiplication (1 us)
[ RUN      ] LlvmLibcMemSizeTest.AlignUp
[       OK ] LlvmLibcMemSizeTest.AlignUp (24 us)
[ RUN      ] LlvmLibcBlockBitTest.OffsetTo
[       OK ] LlvmLibcBlockBitTest.OffsetTo (3 us)
Ran 5 tests.  PASS: 5  FAIL: 0
[931/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.str_to_float_test.__unit__.__build__.dir/str_to_double_test.cpp.o
[932/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.str_to_float_test.__unit__.__build__.dir/str_to_long_double_test.cpp.o
[933/2785] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.ilogbf_test.__unit__.__build__.dir/ilogbf_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.ilogbf_test.__unit__.__build__.dir/ilogbf_test.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -Iprojects/libc/test/src/math -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc -isystem projects/libc/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -mcpu=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.ilogbf_test.__unit__.__build__.dir/ilogbf_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.ilogbf_test.__unit__.__build__.dir/ilogbf_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.ilogbf_test.__unit__.__build__.dir/ilogbf_test.cpp.o -c /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ilogbf_test.cpp
In file included from /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ilogbf_test.cpp:9:
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ILogbTest.h:85:11: error: use of undeclared identifier 'isnan'
      if (isnan(x) || isinf(x) || x == 0.0)
          ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ilogbf_test.cpp:31:3: note: in instantiation of function template specialization 'LlvmLibcILogbTest::test_subnormal_range<float>' requested here
  test_subnormal_range<float>(&LIBC_NAMESPACE::ilogbf);
  ^
In file included from /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ilogbf_test.cpp:9:
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ILogbTest.h:104:11: error: use of undeclared identifier 'isnan'
      if (isnan(x) || isinf(x) || x == 0.0)
          ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ilogbf_test.cpp:35:3: note: in instantiation of function template specialization 'LlvmLibcILogbTest::test_normal_range<float>' requested here
  test_normal_range<float>(&LIBC_NAMESPACE::ilogbf);
  ^
2 errors generated.
[934/2785] Linking CXX executable projects/libc/test/include/libc.test.include.stdbit_test.__unit__.__build__
[935/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.endian_test.__unit__.__build__.dir/endian_test.cpp.o
[936/2785] Linking CXX executable projects/libc/test/src/__support/libc.test.src.__support.str_to_float_test.__unit__.__build__
[937/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.char_vector_test.__unit__.__build__.dir/char_vector_test.cpp.o
[938/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.math_extras_test.__unit__.__build__.dir/math_extras_test.cpp.o
[939/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.fixedvector_test.__unit__.__build__.dir/fixedvector_test.cpp.o
[940/2785] Building CXX object projects/libc/test/src/__support/CPP/CMakeFiles/libc.test.src.__support.CPP.int_seq_test.__unit__.__build__.dir/integer_sequence_test.cpp.o
[941/2785] Building CXX object projects/libc/test/src/sys/mman/linux/CMakeFiles/libc.test.src.sys.mman.linux.madvise_test.__build__.dir/madvise_test.cpp.o
[942/2785] Building CXX object projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.log2f_test.__unit__.__build__.dir/log2f_test.cpp.o
[943/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.hash_test.__unit__.__build__.dir/hash_test.cpp.o
[944/2785] Building CXX object projects/libc/test/src/sys/mman/linux/CMakeFiles/libc.test.src.sys.mman.linux.mmap_test.__build__.dir/mmap_test.cpp.o
[945/2785] Building CXX object projects/libc/test/src/__support/CPP/CMakeFiles/libc.test.src.__support.CPP.array_test.__unit__.__build__.dir/array_test.cpp.o
[946/2785] Building CXX object projects/libc/test/src/__support/CPP/CMakeFiles/libc.test.src.__support.CPP.bitset_test.__unit__.__build__.dir/bitset_test.cpp.o
[947/2785] Building CXX object projects/libc/test/src/__support/CPP/CMakeFiles/libc.test.src.__support.CPP.string_test.__unit__.__build__.dir/string_test.cpp.o
[948/2785] Building CXX object projects/libc/test/src/__support/CPP/CMakeFiles/libc.test.src.__support.CPP.cstddef_test.__unit__.__build__.dir/cstddef_test.cpp.o
[949/2785] Building CXX object projects/libc/test/src/__support/CPP/CMakeFiles/libc.test.src.__support.CPP.algorithm_test.__unit__.__build__.dir/algorithm_test.cpp.o
[950/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.block_test.__unit__.__build__.dir/block_test.cpp.o
ninja: build stopped: subcommand failed.
['ninja', 'libc-unit-tests'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 164, in step
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[ RUN      ] LlvmLibcMemSizeTest.Multiplication
[       OK ] LlvmLibcMemSizeTest.Multiplication (1 us)
[ RUN      ] LlvmLibcMemSizeTest.AlignUp
[       OK ] LlvmLibcMemSizeTest.AlignUp (24 us)
[ RUN      ] LlvmLibcBlockBitTest.OffsetTo
[       OK ] LlvmLibcBlockBitTest.OffsetTo (3 us)
Ran 5 tests.  PASS: 5  FAIL: 0
[931/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.str_to_float_test.__unit__.__build__.dir/str_to_double_test.cpp.o
[932/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.str_to_float_test.__unit__.__build__.dir/str_to_long_double_test.cpp.o
[933/2785] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.ilogbf_test.__unit__.__build__.dir/ilogbf_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.ilogbf_test.__unit__.__build__.dir/ilogbf_test.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -Iprojects/libc/test/src/math -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc -isystem projects/libc/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -mcpu=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.ilogbf_test.__unit__.__build__.dir/ilogbf_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.ilogbf_test.__unit__.__build__.dir/ilogbf_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.ilogbf_test.__unit__.__build__.dir/ilogbf_test.cpp.o -c /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ilogbf_test.cpp
In file included from /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ilogbf_test.cpp:9:
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ILogbTest.h:85:11: error: use of undeclared identifier 'isnan'
      if (isnan(x) || isinf(x) || x == 0.0)
          ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ilogbf_test.cpp:31:3: note: in instantiation of function template specialization 'LlvmLibcILogbTest::test_subnormal_range<float>' requested here
  test_subnormal_range<float>(&LIBC_NAMESPACE::ilogbf);
  ^
In file included from /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ilogbf_test.cpp:9:
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ILogbTest.h:104:11: error: use of undeclared identifier 'isnan'
      if (isnan(x) || isinf(x) || x == 0.0)
          ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/test/src/math/ilogbf_test.cpp:35:3: note: in instantiation of function template specialization 'LlvmLibcILogbTest::test_normal_range<float>' requested here
  test_normal_range<float>(&LIBC_NAMESPACE::ilogbf);
  ^
2 errors generated.
[934/2785] Linking CXX executable projects/libc/test/include/libc.test.include.stdbit_test.__unit__.__build__
[935/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.endian_test.__unit__.__build__.dir/endian_test.cpp.o
[936/2785] Linking CXX executable projects/libc/test/src/__support/libc.test.src.__support.str_to_float_test.__unit__.__build__
[937/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.char_vector_test.__unit__.__build__.dir/char_vector_test.cpp.o
[938/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.math_extras_test.__unit__.__build__.dir/math_extras_test.cpp.o
[939/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.fixedvector_test.__unit__.__build__.dir/fixedvector_test.cpp.o
[940/2785] Building CXX object projects/libc/test/src/__support/CPP/CMakeFiles/libc.test.src.__support.CPP.int_seq_test.__unit__.__build__.dir/integer_sequence_test.cpp.o
[941/2785] Building CXX object projects/libc/test/src/sys/mman/linux/CMakeFiles/libc.test.src.sys.mman.linux.madvise_test.__build__.dir/madvise_test.cpp.o
[942/2785] Building CXX object projects/libc/test/src/math/smoke/CMakeFiles/libc.test.src.math.smoke.log2f_test.__unit__.__build__.dir/log2f_test.cpp.o
[943/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.hash_test.__unit__.__build__.dir/hash_test.cpp.o
[944/2785] Building CXX object projects/libc/test/src/sys/mman/linux/CMakeFiles/libc.test.src.sys.mman.linux.mmap_test.__build__.dir/mmap_test.cpp.o
[945/2785] Building CXX object projects/libc/test/src/__support/CPP/CMakeFiles/libc.test.src.__support.CPP.array_test.__unit__.__build__.dir/array_test.cpp.o
[946/2785] Building CXX object projects/libc/test/src/__support/CPP/CMakeFiles/libc.test.src.__support.CPP.bitset_test.__unit__.__build__.dir/bitset_test.cpp.o
[947/2785] Building CXX object projects/libc/test/src/__support/CPP/CMakeFiles/libc.test.src.__support.CPP.string_test.__unit__.__build__.dir/string_test.cpp.o
[948/2785] Building CXX object projects/libc/test/src/__support/CPP/CMakeFiles/libc.test.src.__support.CPP.cstddef_test.__unit__.__build__.dir/cstddef_test.cpp.o
[949/2785] Building CXX object projects/libc/test/src/__support/CPP/CMakeFiles/libc.test.src.__support.CPP.algorithm_test.__unit__.__build__.dir/algorithm_test.cpp.o
[950/2785] Building CXX object projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.block_test.__unit__.__build__.dir/block_test.cpp.o
ninja: build stopped: subcommand failed.
['ninja', 'libc-unit-tests'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
  File "../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py", line 164, in step

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 10, 2024

LLVM Buildbot has detected a new failure on builder libc-x86_64-debian-gcc-fullbuild-dbg running on libc-x86_64-debian-fullbuild while building libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/131/builds/1744

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[       OK ] LlvmLibcFPBitsTest.FloatType (47 us)
[ RUN      ] LlvmLibcFPBitsTest.DoubleType
[       OK ] LlvmLibcFPBitsTest.DoubleType (49 us)
[ RUN      ] LlvmLibcFPBitsTest.X86LongDoubleType
[       OK ] LlvmLibcFPBitsTest.X86LongDoubleType (70 us)
[ RUN      ] LlvmLibcFPBitsTest.Float128Type
[       OK ] LlvmLibcFPBitsTest.Float128Type (70 us)
Ran 20 tests.  PASS: 20  FAIL: 0
[1392/3640] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.feholdexcept_test.__unit__.__build__.dir/feholdexcept_test.cpp.o
[1393/3640] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h: In instantiation of ‘void CopySignTest<T>::testRange(CopySignFunc) [with T = double; CopySignFunc = double (*)(double, double)]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:13:1:   required from here
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:16: error: ‘isnan’ was not declared in this scope
   42 |       if (isnan(x) || isinf(x))
      |           ~~~~~^~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:28: error: ‘isinf’ was not declared in this scope; did you mean ‘inf’?
   42 |       if (isnan(x) || isinf(x))
      |                       ~~~~~^~~
      |                       inf
[1394/3640] Running unit test libc.test.src.fenv.rounding_mode_test
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcRoundingModeTest.SetAndGet
[       OK ] LlvmLibcRoundingModeTest.SetAndGet (4 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1395/3640] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.enabled_exceptions_test.__unit__.__build__.dir/enabled_exceptions_test.cpp.o
[1396/3640] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h: In instantiation of ‘void CopySignTest<T>::testRange(CopySignFunc) [with T = double; CopySignFunc = double (*)(double, double)]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:13:1:   required from here
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:16: error: ‘isnan’ was not declared in this scope
   42 |       if (isnan(x) || isinf(x))
      |           ~~~~~^~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:28: error: ‘isinf’ was not declared in this scope; did you mean ‘inf’?
   42 |       if (isnan(x) || isinf(x))
      |                       ~~~~~^~~
      |                       inf
[1397/3640] Linking CXX executable projects/libc/test/src/fenv/libc.test.src.fenv.exception_status_test.__build__
[1398/3640] Linking CXX executable projects/libc/test/src/fenv/libc.test.src.fenv.getenv_and_setenv_test.__build__
[1399/3640] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignf_test.__unit__.__build__.dir/copysignf_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignf_test.__unit__.__build__.dir/copysignf_test.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignf_test.__unit__.__build__.dir/copysignf_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignf_test.__unit__.__build__.dir/copysignf_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignf_test.__unit__.__build__.dir/copysignf_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysignf_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysignf_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h: In instantiation of ‘void CopySignTest<T>::testRange(CopySignFunc) [with T = float; CopySignFunc = float (*)(float, float)]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysignf_test.cpp:13:1:   required from here
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[       OK ] LlvmLibcFPBitsTest.FloatType (47 us)
[ RUN      ] LlvmLibcFPBitsTest.DoubleType
[       OK ] LlvmLibcFPBitsTest.DoubleType (49 us)
[ RUN      ] LlvmLibcFPBitsTest.X86LongDoubleType
[       OK ] LlvmLibcFPBitsTest.X86LongDoubleType (70 us)
[ RUN      ] LlvmLibcFPBitsTest.Float128Type
[       OK ] LlvmLibcFPBitsTest.Float128Type (70 us)
Ran 20 tests.  PASS: 20  FAIL: 0
[1392/3640] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.feholdexcept_test.__unit__.__build__.dir/feholdexcept_test.cpp.o
[1393/3640] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h: In instantiation of ‘void CopySignTest<T>::testRange(CopySignFunc) [with T = double; CopySignFunc = double (*)(double, double)]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:13:1:   required from here
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:16: error: ‘isnan’ was not declared in this scope
   42 |       if (isnan(x) || isinf(x))
      |           ~~~~~^~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:28: error: ‘isinf’ was not declared in this scope; did you mean ‘inf’?
   42 |       if (isnan(x) || isinf(x))
      |                       ~~~~~^~~
      |                       inf
[1394/3640] Running unit test libc.test.src.fenv.rounding_mode_test
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcRoundingModeTest.SetAndGet
[       OK ] LlvmLibcRoundingModeTest.SetAndGet (4 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1395/3640] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.enabled_exceptions_test.__unit__.__build__.dir/enabled_exceptions_test.cpp.o
[1396/3640] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h: In instantiation of ‘void CopySignTest<T>::testRange(CopySignFunc) [with T = double; CopySignFunc = double (*)(double, double)]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:13:1:   required from here
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:16: error: ‘isnan’ was not declared in this scope
   42 |       if (isnan(x) || isinf(x))
      |           ~~~~~^~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:28: error: ‘isinf’ was not declared in this scope; did you mean ‘inf’?
   42 |       if (isnan(x) || isinf(x))
      |                       ~~~~~^~~
      |                       inf
[1397/3640] Linking CXX executable projects/libc/test/src/fenv/libc.test.src.fenv.exception_status_test.__build__
[1398/3640] Linking CXX executable projects/libc/test/src/fenv/libc.test.src.fenv.getenv_and_setenv_test.__build__
[1399/3640] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignf_test.__unit__.__build__.dir/copysignf_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignf_test.__unit__.__build__.dir/copysignf_test.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignf_test.__unit__.__build__.dir/copysignf_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignf_test.__unit__.__build__.dir/copysignf_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignf_test.__unit__.__build__.dir/copysignf_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysignf_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysignf_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h: In instantiation of ‘void CopySignTest<T>::testRange(CopySignFunc) [with T = float; CopySignFunc = float (*)(float, float)]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/src/math/copysignf_test.cpp:13:1:   required from here

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 10, 2024

LLVM Buildbot has detected a new failure on builder libc-x86_64-debian-fullbuild-dbg running on libc-x86_64-debian-fullbuild while building libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/179/builds/1742

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
Ran 20 tests.  PASS: 20  FAIL: 0
[1388/3640] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.feclearexcept_test.__build__.dir/feclearexcept_test.cpp.o
[1389/3640] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.exception_flags_test.__build__.dir/exception_flags_test.cpp.o
[1390/3640] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.feenableexcept_test.__build__.dir/feenableexcept_test.cpp.o
[1391/3640] Running unit test libc.test.src.errno.errno_test
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcErrnoTest.Basic
[       OK ] LlvmLibcErrnoTest.Basic (5 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1392/3640] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:11: error: use of undeclared identifier 'isnan'
      if (isnan(x) || isinf(x))
          ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:13:1: note: in instantiation of member function 'CopySignTest<double>::testRange' requested here
LIST_COPYSIGN_TESTS(double, LIBC_NAMESPACE::copysign)
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:57:41: note: expanded from macro 'LIST_COPYSIGN_TESTS'
  TEST_F(LlvmLibcCopySignTest, Range) { testRange(&func); }
                                        ^
1 error generated.
[1393/3640] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:11: error: use of undeclared identifier 'isnan'
      if (isnan(x) || isinf(x))
          ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:13:1: note: in instantiation of member function 'CopySignTest<double>::testRange' requested here
LIST_COPYSIGN_TESTS(double, LIBC_NAMESPACE::copysign)
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:57:41: note: expanded from macro 'LIST_COPYSIGN_TESTS'
  TEST_F(LlvmLibcCopySignTest, Range) { testRange(&func); }
                                        ^
1 error generated.
[1394/3640] Linking CXX executable projects/libc/test/src/fenv/libc.test.src.fenv.rounding_mode_test.__build__
[1395/3640] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignl_test.__unit__.__build__.dir/copysignl_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignl_test.__unit__.__build__.dir/copysignl_test.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignl_test.__unit__.__build__.dir/copysignl_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignl_test.__unit__.__build__.dir/copysignl_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignl_test.__unit__.__build__.dir/copysignl_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysignl_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysignl_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:11: error: use of undeclared identifier 'isnan'
      if (isnan(x) || isinf(x))
          ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysignl_test.cpp:13:1: note: in instantiation of member function 'CopySignTest<long double>::testRange' requested here
LIST_COPYSIGN_TESTS(long double, LIBC_NAMESPACE::copysignl)
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:57:41: note: expanded from macro 'LIST_COPYSIGN_TESTS'
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
Ran 20 tests.  PASS: 20  FAIL: 0
[1388/3640] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.feclearexcept_test.__build__.dir/feclearexcept_test.cpp.o
[1389/3640] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.exception_flags_test.__build__.dir/exception_flags_test.cpp.o
[1390/3640] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.feenableexcept_test.__build__.dir/feenableexcept_test.cpp.o
[1391/3640] Running unit test libc.test.src.errno.errno_test
[==========] Running 1 test from 1 test suite.
[ RUN      ] LlvmLibcErrnoTest.Basic
[       OK ] LlvmLibcErrnoTest.Basic (5 us)
Ran 1 tests.  PASS: 1  FAIL: 0
[1392/3640] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:11: error: use of undeclared identifier 'isnan'
      if (isnan(x) || isinf(x))
          ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:13:1: note: in instantiation of member function 'CopySignTest<double>::testRange' requested here
LIST_COPYSIGN_TESTS(double, LIBC_NAMESPACE::copysign)
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:57:41: note: expanded from macro 'LIST_COPYSIGN_TESTS'
  TEST_F(LlvmLibcCopySignTest, Range) { testRange(&func); }
                                        ^
1 error generated.
[1393/3640] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__NO_FMA_OPT.__build__.dir/copysign_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:11: error: use of undeclared identifier 'isnan'
      if (isnan(x) || isinf(x))
          ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysign_test.cpp:13:1: note: in instantiation of member function 'CopySignTest<double>::testRange' requested here
LIST_COPYSIGN_TESTS(double, LIBC_NAMESPACE::copysign)
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:57:41: note: expanded from macro 'LIST_COPYSIGN_TESTS'
  TEST_F(LlvmLibcCopySignTest, Range) { testRange(&func); }
                                        ^
1 error generated.
[1394/3640] Linking CXX executable projects/libc/test/src/fenv/libc.test.src.fenv.rounding_mode_test.__build__
[1395/3640] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignl_test.__unit__.__build__.dir/copysignl_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignl_test.__unit__.__build__.dir/copysignl_test.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignl_test.__unit__.__build__.dir/copysignl_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignl_test.__unit__.__build__.dir/copysignl_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysignl_test.__unit__.__build__.dir/copysignl_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysignl_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysignl_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:42:11: error: use of undeclared identifier 'isnan'
      if (isnan(x) || isinf(x))
          ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/copysignl_test.cpp:13:1: note: in instantiation of member function 'CopySignTest<long double>::testRange' requested here
LIST_COPYSIGN_TESTS(long double, LIBC_NAMESPACE::copysignl)
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg/llvm-project/libc/test/src/math/CopySignTest.h:57:41: note: expanded from macro 'LIST_COPYSIGN_TESTS'

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 10, 2024

LLVM Buildbot has detected a new failure on builder libc-x86_64-debian-fullbuild-dbg-asan running on libc-x86_64-debian-fullbuild while building libc at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/171/builds/1730

Here is the relevant piece of the build log for the reference:

Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[ RUN      ] LlvmLibcSupportThreadsRawMutexTest.Timeout
[       OK ] LlvmLibcSupportThreadsRawMutexTest.Timeout (70 us)
[ RUN      ] LlvmLibcSupportThreadsRawMutexTest.PSharedLock
[       OK ] LlvmLibcSupportThreadsRawMutexTest.PSharedLock (8 ms)
Ran 3 tests.  PASS: 3  FAIL: 0
[1348/3623] Linking CXX executable projects/libc/test/src/__support/CPP/libc.test.src.__support.CPP.string_test.__unit__.__build__
[1349/3623] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.getenv_and_setenv_test.__build__.dir/getenv_and_setenv_test.cpp.o
[1350/3623] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.tolower_test.__unit__.__build__
[1351/3623] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.feupdateenv_test.__build__.dir/feupdateenv_test.cpp.o
[1352/3623] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -g -mavx2 -mfma -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/copysign_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/copysign_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/CopySignTest.h:42:11: error: use of undeclared identifier 'isnan'
      if (isnan(x) || isinf(x))
          ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/copysign_test.cpp:13:1: note: in instantiation of member function 'CopySignTest<double>::testRange' requested here
LIST_COPYSIGN_TESTS(double, LIBC_NAMESPACE::copysign)
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/CopySignTest.h:57:41: note: expanded from macro 'LIST_COPYSIGN_TESTS'
  TEST_F(LlvmLibcCopySignTest, Range) { testRange(&func); }
                                        ^
1 error generated.
[1353/3623] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isxdigit_test.__unit__.__build__
[1354/3623] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.toascii_test.__unit__.__build__
[1355/3623] Running unit test libc.test.src.__support.CPP.string_test.__unit__
[==========] Running 19 tests from 1 test suite.
[ RUN      ] LlvmLibcStringTest.InitializeEmpty
[       OK ] LlvmLibcStringTest.InitializeEmpty (17 us)
[ RUN      ] LlvmLibcStringTest.InitializeCString
[       OK ] LlvmLibcStringTest.InitializeCString (23 us)
[ RUN      ] LlvmLibcStringTest.ToCString
[       OK ] LlvmLibcStringTest.ToCString (19 us)
[ RUN      ] LlvmLibcStringTest.ToStringView
[       OK ] LlvmLibcStringTest.ToStringView (24 us)
[ RUN      ] LlvmLibcStringTest.InitializeCStringWithSize
[       OK ] LlvmLibcStringTest.InitializeCStringWithSize (12 us)
[ RUN      ] LlvmLibcStringTest.InitializeStringView
[       OK ] LlvmLibcStringTest.InitializeStringView (19 us)
[ RUN      ] LlvmLibcStringTest.InitializeRepeatedChar
[       OK ] LlvmLibcStringTest.InitializeRepeatedChar (19 us)
[ RUN      ] LlvmLibcStringTest.InitializeZeorChar
[       OK ] LlvmLibcStringTest.InitializeZeorChar (2 us)
[ RUN      ] LlvmLibcStringTest.CopyConstruct
[       OK ] LlvmLibcStringTest.CopyConstruct (34 us)
[ RUN      ] LlvmLibcStringTest.CopyAssign
[       OK ] LlvmLibcStringTest.CopyAssign (35 us)
[ RUN      ] LlvmLibcStringTest.MoveConstruct
[       OK ] LlvmLibcStringTest.MoveConstruct (21 us)
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[ RUN      ] LlvmLibcSupportThreadsRawMutexTest.Timeout
[       OK ] LlvmLibcSupportThreadsRawMutexTest.Timeout (70 us)
[ RUN      ] LlvmLibcSupportThreadsRawMutexTest.PSharedLock
[       OK ] LlvmLibcSupportThreadsRawMutexTest.PSharedLock (8 ms)
Ran 3 tests.  PASS: 3  FAIL: 0
[1348/3623] Linking CXX executable projects/libc/test/src/__support/CPP/libc.test.src.__support.CPP.string_test.__unit__.__build__
[1349/3623] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.getenv_and_setenv_test.__build__.dir/getenv_and_setenv_test.cpp.o
[1350/3623] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.tolower_test.__unit__.__build__
[1351/3623] Building CXX object projects/libc/test/src/fenv/CMakeFiles/libc.test.src.fenv.feupdateenv_test.__build__.dir/feupdateenv_test.cpp.o
[1352/3623] Building CXX object projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o
FAILED: projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_19_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/build/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -O1 -fsanitize=address -fdiagnostics-color -g -mavx2 -mfma -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -march=native -std=c++17 -MD -MT projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o -MF projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o.d -o projects/libc/test/src/math/CMakeFiles/libc.test.src.math.copysign_test.__unit__.__build__.dir/copysign_test.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/copysign_test.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/copysign_test.cpp:9:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/CopySignTest.h:42:11: error: use of undeclared identifier 'isnan'
      if (isnan(x) || isinf(x))
          ^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/copysign_test.cpp:13:1: note: in instantiation of member function 'CopySignTest<double>::testRange' requested here
LIST_COPYSIGN_TESTS(double, LIBC_NAMESPACE::copysign)
^
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-fullbuild-dbg-asan/llvm-project/libc/test/src/math/CopySignTest.h:57:41: note: expanded from macro 'LIST_COPYSIGN_TESTS'
  TEST_F(LlvmLibcCopySignTest, Range) { testRange(&func); }
                                        ^
1 error generated.
[1353/3623] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.isxdigit_test.__unit__.__build__
[1354/3623] Linking CXX executable projects/libc/test/src/ctype/libc.test.src.ctype.toascii_test.__unit__.__build__
[1355/3623] Running unit test libc.test.src.__support.CPP.string_test.__unit__
[==========] Running 19 tests from 1 test suite.
[ RUN      ] LlvmLibcStringTest.InitializeEmpty
[       OK ] LlvmLibcStringTest.InitializeEmpty (17 us)
[ RUN      ] LlvmLibcStringTest.InitializeCString
[       OK ] LlvmLibcStringTest.InitializeCString (23 us)
[ RUN      ] LlvmLibcStringTest.ToCString
[       OK ] LlvmLibcStringTest.ToCString (19 us)
[ RUN      ] LlvmLibcStringTest.ToStringView
[       OK ] LlvmLibcStringTest.ToStringView (24 us)
[ RUN      ] LlvmLibcStringTest.InitializeCStringWithSize
[       OK ] LlvmLibcStringTest.InitializeCStringWithSize (12 us)
[ RUN      ] LlvmLibcStringTest.InitializeStringView
[       OK ] LlvmLibcStringTest.InitializeStringView (19 us)
[ RUN      ] LlvmLibcStringTest.InitializeRepeatedChar
[       OK ] LlvmLibcStringTest.InitializeRepeatedChar (19 us)
[ RUN      ] LlvmLibcStringTest.InitializeZeorChar
[       OK ] LlvmLibcStringTest.InitializeZeorChar (2 us)
[ RUN      ] LlvmLibcStringTest.CopyConstruct
[       OK ] LlvmLibcStringTest.CopyConstruct (34 us)
[ RUN      ] LlvmLibcStringTest.CopyAssign
[       OK ] LlvmLibcStringTest.CopyAssign (35 us)
[ RUN      ] LlvmLibcStringTest.MoveConstruct
[       OK ] LlvmLibcStringTest.MoveConstruct (21 us)

petrhosek added a commit to petrhosek/llvm-project that referenced this pull request Jul 10, 2024
petrhosek added a commit that referenced this pull request Jul 10, 2024
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
While C99 defines type generic isnan macro, BSD provided isnan, isnanf
and isnanl in prior C standards and existing code still relies on these.
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
tejas101k pushed a commit to ProjectInfinity-X/bionic that referenced this pull request Dec 14, 2024
isnan() and isinf() are type-generic macros, not usually declared as functions. Remove the function declarations and the big comment talking about how we shouldn't expose them.

isnanl() and isinfl() are exposed as functions by glibc (but not the BSDs), and we've always had the definitions, so we can increase source compatibility there trivially.

See the discussion on llvm/llvm-project#96008 for more background.

Change-Id: I798153f710794870bb4864f2ae8b98147f9d8763
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants