Skip to content

[libc][complex] Implement different flavors of the conj function #118671

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 12 commits into from
Dec 10, 2024

Conversation

Sh0g0-1758
Copy link
Member

Refer section 7.3.9.4 of ISO/IEC 9899:2023

@llvmbot llvmbot added the libc label Dec 4, 2024
@Sh0g0-1758 Sh0g0-1758 self-assigned this Dec 4, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 4, 2024

@llvm/pr-subscribers-libc

Author: Shourya Goel (Sh0g0-1758)

Changes

Refer section 7.3.9.4 of ISO/IEC 9899:2023


Patch is 29.31 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/118671.diff

26 Files Affected:

  • (modified) libc/config/linux/aarch64/entrypoints.txt (+5)
  • (modified) libc/config/linux/arm/entrypoints.txt (+3)
  • (modified) libc/config/linux/riscv/entrypoints.txt (+4)
  • (modified) libc/config/linux/x86_64/entrypoints.txt (+5)
  • (modified) libc/docs/complex.rst (+1-1)
  • (modified) libc/src/complex/CMakeLists.txt (+6)
  • (added) libc/src/complex/conj.h (+20)
  • (added) libc/src/complex/conjf.h (+20)
  • (added) libc/src/complex/conjf128.h (+27)
  • (added) libc/src/complex/conjf16.h (+27)
  • (added) libc/src/complex/conjl.h (+20)
  • (modified) libc/src/complex/generic/CMakeLists.txt (+69)
  • (added) libc/src/complex/generic/conj.cpp (+21)
  • (added) libc/src/complex/generic/conjf.cpp (+21)
  • (added) libc/src/complex/generic/conjf128.cpp (+25)
  • (added) libc/src/complex/generic/conjf16.cpp (+25)
  • (added) libc/src/complex/generic/conjl.cpp (+21)
  • (modified) libc/test/src/complex/CImagTest.h (+4-3)
  • (modified) libc/test/src/complex/CMakeLists.txt (+60)
  • (modified) libc/test/src/complex/CRealTest.h (+4-2)
  • (added) libc/test/src/complex/ConjTest.h (+123)
  • (added) libc/test/src/complex/conj_test.cpp (+13)
  • (added) libc/test/src/complex/conjf128_test.cpp (+18)
  • (added) libc/test/src/complex/conjf16_test.cpp (+17)
  • (added) libc/test/src/complex/conjf_test.cpp (+13)
  • (added) libc/test/src/complex/conjl_test.cpp (+13)
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index aa0b8ba0490e98..7b855e14a9e8eb 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -366,6 +366,9 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.complex.cimag
     libc.src.complex.cimagf
     libc.src.complex.cimagl
+    libc.src.complex.conj
+    libc.src.complex.conjf
+    libc.src.complex.conjl
 
     # fenv.h entrypoints
     libc.src.fenv.feclearexcept
@@ -617,6 +620,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
     # complex.h C23 _Complex _Float16 entrypoints
     # libc.src.complex.crealf16
     # libc.src.complex.cimagf16
+    # libc.src.complex.conjf16
     
     # math.h C23 _Float16 entrypoints
     libc.src.math.canonicalizef16
@@ -722,6 +726,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
     # complex.h C23 _Complex _Float128 entrypoints
     libc.src.complex.crealf128
     libc.src.complex.cimagf128
+    libc.src.complex.conjf128
 
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef128
diff --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index 31d81de06fb6b0..babdf92bb56764 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -207,6 +207,9 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.complex.cimag
     libc.src.complex.cimagf
     libc.src.complex.cimagl
+    libc.src.complex.conj
+    libc.src.complex.conjf
+    libc.src.complex.conjl
     
     # fenv.h entrypoints
     libc.src.fenv.feclearexcept
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index fedc5002d8c246..c7db77fe8875a2 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -365,6 +365,9 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.complex.cimag
     libc.src.complex.cimagf
     libc.src.complex.cimagl
+    libc.src.complex.conj
+    libc.src.complex.conjf
+    libc.src.complex.conjl
 
     # fenv.h entrypoints
     libc.src.fenv.feclearexcept
@@ -620,6 +623,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
     # complex.h C23 _Complex _Float128 entrypoints
     libc.src.complex.crealf128
     libc.src.complex.cimagf128
+    libc.src.complex.conjf128
     
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef128
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 5e9cc71279ab16..69ac5652fba2f3 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -366,6 +366,9 @@ set(TARGET_LIBM_ENTRYPOINTS
     libc.src.complex.cimag
     libc.src.complex.cimagf
     libc.src.complex.cimagl
+    libc.src.complex.conj
+    libc.src.complex.conjf
+    libc.src.complex.conjl
     
     # fenv.h entrypoints
     libc.src.fenv.feclearexcept
@@ -622,6 +625,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
     # complex.h C23 _Complex _Float16 entrypoints
     libc.src.complex.crealf16
     libc.src.complex.cimagf16
+    libc.src.complex.conjf16
 
     # math.h C23 _Float16 entrypoints
     libc.src.math.canonicalizef16
@@ -731,6 +735,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
     # complex.h C23 _Complex _Float128 entrypoints
     # libc.src.complex.crealf128
     # libc.src.complex.cimagf128
+    # libc.src.complex.conjf128
     
     # math.h C23 _Float128 entrypoints
     libc.src.math.canonicalizef128
diff --git a/libc/docs/complex.rst b/libc/docs/complex.rst
index 1e74f16b60e660..3e375d5491640f 100644
--- a/libc/docs/complex.rst
+++ b/libc/docs/complex.rst
@@ -57,7 +57,7 @@ Functions
 +-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
 | cimag     | |check|          | |check|         | |check|                | |check|              | |check|                | 7.3.9.2                | N/A                        |
 +-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
-| conj      |                  |                 |                        |                      |                        | 7.3.9.4                | N/A                        |
+| conj      | |check|          | |check|         | |check|                | |check|              | |check|                | 7.3.9.4                | N/A                        |
 +-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
 | cproj     |                  |                 |                        |                      |                        | 7.3.9.5                | N/A                        |
 +-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
diff --git a/libc/src/complex/CMakeLists.txt b/libc/src/complex/CMakeLists.txt
index 289cce5455af78..7306e2fe925e3a 100644
--- a/libc/src/complex/CMakeLists.txt
+++ b/libc/src/complex/CMakeLists.txt
@@ -24,3 +24,9 @@ add_complex_entrypoint_object(cimagf)
 add_complex_entrypoint_object(cimagl)
 add_complex_entrypoint_object(cimagf16)
 add_complex_entrypoint_object(cimagf128)
+
+add_complex_entrypoint_object(conj)
+add_complex_entrypoint_object(conjf)
+add_complex_entrypoint_object(conjl)
+add_complex_entrypoint_object(conjf16)
+add_complex_entrypoint_object(conjf128)
diff --git a/libc/src/complex/conj.h b/libc/src/complex/conj.h
new file mode 100644
index 00000000000000..2ff82d27586202
--- /dev/null
+++ b/libc/src/complex/conj.h
@@ -0,0 +1,20 @@
+//===-- Implementation header for conj --------------------------*- 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_COMPLEX_CONJ_H
+#define LLVM_LIBC_SRC_COMPLEX_CONJ_H
+
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+_Complex double conj(_Complex double x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_COMPLEX_CONJ_H
diff --git a/libc/src/complex/conjf.h b/libc/src/complex/conjf.h
new file mode 100644
index 00000000000000..6b3bd612e5bf7d
--- /dev/null
+++ b/libc/src/complex/conjf.h
@@ -0,0 +1,20 @@
+//===-- Implementation header for conjf -------------------------*- 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_COMPLEX_CONJF_H
+#define LLVM_LIBC_SRC_COMPLEX_CONJF_H
+
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+_Complex float conjf(_Complex float x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_COMPLEX_CONJF_H
diff --git a/libc/src/complex/conjf128.h b/libc/src/complex/conjf128.h
new file mode 100644
index 00000000000000..587c979d315efb
--- /dev/null
+++ b/libc/src/complex/conjf128.h
@@ -0,0 +1,27 @@
+//===-- Implementation header for conjf128 ----------------------*- 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
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/__support/macros/properties/complex_types.h"
+#include "src/__support/macros/properties/types.h"
+
+#if defined(LIBC_TYPES_HAS_CFLOAT128)
+
+#ifndef LLVM_LIBC_SRC_COMPLEX_CONJF128_H
+#define LLVM_LIBC_SRC_COMPLEX_CONJF128_H
+
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+cfloat128 conjf128(cfloat128 x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_COMPLEX_CONJF128_H
+
+#endif // LIBC_TYPES_HAS_CFLOAT128
diff --git a/libc/src/complex/conjf16.h b/libc/src/complex/conjf16.h
new file mode 100644
index 00000000000000..b15c5b3f61f4a0
--- /dev/null
+++ b/libc/src/complex/conjf16.h
@@ -0,0 +1,27 @@
+//===-- Implementation header for conjf16 -----------------------*- 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
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/__support/macros/properties/complex_types.h"
+#include "src/__support/macros/properties/types.h"
+
+#if defined(LIBC_TYPES_HAS_CFLOAT16)
+
+#ifndef LLVM_LIBC_SRC_COMPLEX_CONJF16_H
+#define LLVM_LIBC_SRC_COMPLEX_CONJF16_H
+
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+cfloat16 conjf16(cfloat16 x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_COMPLEX_CONJF16_H
+
+#endif // LIBC_TYPES_HAS_CFLOAT16
diff --git a/libc/src/complex/conjl.h b/libc/src/complex/conjl.h
new file mode 100644
index 00000000000000..aec640f9433ac6
--- /dev/null
+++ b/libc/src/complex/conjl.h
@@ -0,0 +1,20 @@
+//===-- Implementation header for conjl -------------------------*- 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_COMPLEX_CONJL_H
+#define LLVM_LIBC_SRC_COMPLEX_CONJL_H
+
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+_Complex long double conjl(_Complex long double x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_COMPLEX_CONJL_H
diff --git a/libc/src/complex/generic/CMakeLists.txt b/libc/src/complex/generic/CMakeLists.txt
index a3da781c602378..cc14f89122eddd 100644
--- a/libc/src/complex/generic/CMakeLists.txt
+++ b/libc/src/complex/generic/CMakeLists.txt
@@ -1,3 +1,72 @@
+add_entrypoint_object(
+  conj
+  SRCS
+    conj.cpp
+  HDRS
+    ../conj.h
+  COMPILE_OPTIONS
+    ${libc_opt_high_flag}
+  DEPENDS
+    libc.src.__support.CPP.bit
+    libc.src.__support.complex_type
+)
+
+add_entrypoint_object(
+  conjf
+  SRCS
+    conjf.cpp
+  HDRS
+    ../conjf.h
+  COMPILE_OPTIONS
+    ${libc_opt_high_flag}
+  DEPENDS
+    libc.src.__support.CPP.bit
+    libc.src.__support.complex_type
+)
+
+add_entrypoint_object(
+  conjl
+  SRCS
+    conjl.cpp
+  HDRS
+    ../conjl.h
+  COMPILE_OPTIONS
+    ${libc_opt_high_flag}
+  DEPENDS
+    libc.src.__support.CPP.bit
+    libc.src.__support.complex_type
+)
+
+add_entrypoint_object(
+  conjf16
+  SRCS
+    conjf16.cpp
+  HDRS
+    ../conjf16.h
+  COMPILE_OPTIONS
+    ${libc_opt_high_flag}
+  DEPENDS
+    libc.src.__support.CPP.bit
+    libc.src.__support.complex_type
+    libc.src.__support.macros.properties.types
+    libc.src.__support.macros.properties.complex_types
+)
+
+add_entrypoint_object(
+  conjf128
+  SRCS
+    conjf128.cpp
+  HDRS
+    ../conjf128.h
+  COMPILE_OPTIONS
+    ${libc_opt_high_flag}
+  DEPENDS
+    libc.src.__support.CPP.bit
+    libc.src.__support.complex_type
+    libc.src.__support.macros.properties.types
+    libc.src.__support.macros.properties.complex_types
+)
+
 add_entrypoint_object(
   creal
   SRCS
diff --git a/libc/src/complex/generic/conj.cpp b/libc/src/complex/generic/conj.cpp
new file mode 100644
index 00000000000000..0d1376af34e9a0
--- /dev/null
+++ b/libc/src/complex/generic/conj.cpp
@@ -0,0 +1,21 @@
+//===-- Implementation of conj 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/complex/conj.h"
+#include "src/__support/CPP/bit.h"
+#include "src/__support/common.h"
+#include "src/__support/complex_type.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(_Complex double, conj, (_Complex double x)) {
+  Complex<double> x_c = cpp::bit_cast<Complex<double>>(x);
+  return (x_c.real - x_c.imag * 1.0i);
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/complex/generic/conjf.cpp b/libc/src/complex/generic/conjf.cpp
new file mode 100644
index 00000000000000..1d83a043f970de
--- /dev/null
+++ b/libc/src/complex/generic/conjf.cpp
@@ -0,0 +1,21 @@
+//===-- Implementation of conjf 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/complex/conjf.h"
+#include "src/__support/CPP/bit.h"
+#include "src/__support/common.h"
+#include "src/__support/complex_type.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(_Complex float, conjf, (_Complex float x)) {
+  Complex<float> x_c = cpp::bit_cast<Complex<float>>(x);
+  return (x_c.real - x_c.imag * (_Complex float)1.0i);
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/complex/generic/conjf128.cpp b/libc/src/complex/generic/conjf128.cpp
new file mode 100644
index 00000000000000..03114d331480b1
--- /dev/null
+++ b/libc/src/complex/generic/conjf128.cpp
@@ -0,0 +1,25 @@
+//===-- Implementation of conjf128 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/complex/conjf128.h"
+#if defined(LIBC_TYPES_HAS_CFLOAT128)
+
+#include "src/__support/CPP/bit.h"
+#include "src/__support/common.h"
+#include "src/__support/complex_type.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(cfloat128, conjf128, (cfloat128 x)) {
+  Complex<float128> x_c = cpp::bit_cast<Complex<float128>>(x);
+  return (x_c.real - x_c.imag * (cfloat128)1.0i);
+}
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_CFLOAT128
diff --git a/libc/src/complex/generic/conjf16.cpp b/libc/src/complex/generic/conjf16.cpp
new file mode 100644
index 00000000000000..4c1ed0e60c1f2f
--- /dev/null
+++ b/libc/src/complex/generic/conjf16.cpp
@@ -0,0 +1,25 @@
+//===-- Implementation of conjf16 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/complex/conjf16.h"
+#if defined(LIBC_TYPES_HAS_CFLOAT16)
+
+#include "src/__support/CPP/bit.h"
+#include "src/__support/common.h"
+#include "src/__support/complex_type.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(cfloat16, conjf16, (cfloat16 x)) {
+  Complex<float16> x_c = cpp::bit_cast<Complex<float16>>(x);
+  return (x_c.real - x_c.imag * (cfloat16)1.0i);
+}
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_CFLOAT16
diff --git a/libc/src/complex/generic/conjl.cpp b/libc/src/complex/generic/conjl.cpp
new file mode 100644
index 00000000000000..9e49217551c0d8
--- /dev/null
+++ b/libc/src/complex/generic/conjl.cpp
@@ -0,0 +1,21 @@
+//===-- Implementation of conjl 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/complex/conjl.h"
+#include "src/__support/CPP/bit.h"
+#include "src/__support/common.h"
+#include "src/__support/complex_type.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(_Complex long double, conjl, (_Complex long double x)) {
+  Complex<long double> x_c = cpp::bit_cast<Complex<long double>>(x);
+  return (x_c.real - x_c.imag * (_Complex long double)1.0i);
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/test/src/complex/CImagTest.h b/libc/test/src/complex/CImagTest.h
index 6d2f9350026691..31236f7bf9a0d5 100644
--- a/libc/test/src/complex/CImagTest.h
+++ b/libc/test/src/complex/CImagTest.h
@@ -38,9 +38,10 @@ class CImagTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
                  neg_min_denormal);
     EXPECT_FP_EQ(func(CFPT(1241.112 + max_denormal * 1.0i)), max_denormal);
     EXPECT_FP_EQ(func(CFPT(121.121 + zero * 1.0i)), zero);
-    EXPECT_FP_EQ(func(CFPT(neg_zero + zero * 1.0i)), zero);
-    EXPECT_FP_EQ(func(CFPT(neg_zero + neg_zero * 1.0i)), neg_zero);
-    EXPECT_FP_EQ(func(CFPT(zero + neg_zero * 1.0i)), neg_zero);
+    EXPECT_FP_EQ(func(CFPT(0.0 + 0.0i)), 0.0);
+    EXPECT_FP_EQ(func(CFPT(-0.0 + 0.0i)), 0.0);
+    EXPECT_FP_EQ(func(CFPT(0.0 - 0.0i)), -0.0);
+    EXPECT_FP_EQ(func(CFPT(-0.0 - 0.0i)), -0.0);
   }
 
   void testRoundedNumbers(CImagFunc func) {
diff --git a/libc/test/src/complex/CMakeLists.txt b/libc/test/src/complex/CMakeLists.txt
index 8f49e6d79e1796..0c668d9e1e8b9c 100644
--- a/libc/test/src/complex/CMakeLists.txt
+++ b/libc/test/src/complex/CMakeLists.txt
@@ -1,5 +1,65 @@
 add_custom_target(libc-complex-unittests)
 
+add_libc_test(
+  conj_test
+  SUITE
+    libc-complex-unittests
+  SRCS
+    conj_test.cpp
+  DEPENDS
+    libc.src.complex.conj
+  LINK_LIBRARIES
+      LibcFPTestHelpers
+)
+
+add_libc_test(
+  conjf_test
+  SUITE
+    libc-complex-unittests
+  SRCS
+    conjf_test.cpp
+  DEPENDS
+    libc.src.complex.conjf
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  conjl_test
+  SUITE
+    libc-complex-unittests
+  SRCS
+    conjl_test.cpp
+  DEPENDS
+    libc.src.complex.conjl
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  conjf16_test
+  SUITE
+    libc-complex-unittests
+  SRCS
+    conjf16_test.cpp
+  DEPENDS
+    libc.src.complex.conjf16
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  conjf128_test
+  SUITE
+    libc-complex-unittests
+  SRCS
+    conjf128_test.cpp
+  DEPENDS
+    libc.src.complex.conjf128
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
 add_libc_test(
   creal_test
   SUITE
diff --git a/libc/test/src/complex/CRealTest.h b/libc/test/src/complex/CRealTest.h
index a25555b506e225..9f1aed0fddfee1 100644
--- a/libc/test/src/complex/CRealTest.h
+++ b/libc/test/src/complex/CRealTest.h
@@ -37,8 +37,10 @@ class CRealTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
     EXPECT_FP_EQ(func(CFPT(neg_min_denormal + 781.134i)), neg_min_denormal);
     EXPECT_FP_EQ(func(CFPT(max_denormal + 1241.112i)), max_denormal);
     EXPECT_FP_EQ(func(CFPT(zero + 121.121i)), zero);
-    EXPECT_FP_EQ(func(CFPT(neg_zero + neg_zero * 1.0i)), neg_zero);
-    EXPECT_FP_EQ(func(CFPT(neg_zero + zero * 1.0i)), zero);
+    EXPECT_FP_EQ(func(CFPT(0.0 + 0.0i)), 0.0);
+    EXPECT_FP_EQ(func(CFPT(-0.0 + 0.0i)), 0.0);
+    EXPECT_FP_EQ(func(CFPT(0.0 - 0.0i)), 0.0);
+    EXPECT_FP_EQ(func(CFPT(-0.0 - 0.0i)), -0.0);
   }
 
   void testRoundedNumbers(CRealFunc func) {
diff --git a/libc/test/src/complex/ConjTest.h b/libc/test/src/complex/ConjTest.h
new file mode 100644
index 00000000000000..2257f44909e6b9
--- /dev/null
+++ b/libc/test/src/complex/ConjTest.h
@@ -0,0 +1,123 @@
+//===-- Utility class to test different flavors of conj ---------*- 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
+//
+//===-------------...
[truncated]

@Sh0g0-1758 Sh0g0-1758 requested a review from lntue December 7, 2024 11:00
Copy link
Contributor

@lntue lntue left a comment

Choose a reason for hiding this comment

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

LGTM with one nit.

@Sh0g0-1758 Sh0g0-1758 merged commit 78c2b6d into llvm:main Dec 10, 2024
8 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 10, 2024

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

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

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)
...
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile
-- Configuring done
-- Generating done
-- Build files have been written to: /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/build
@@@BUILD_STEP build libc@@@
Running: ninja libc
[1/13] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf128.dir/cimagf128.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf128.dir/cimagf128.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -Iprojects/libc/src/complex/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/complex/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf128.dir/cimagf128.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf128.dir/cimagf128.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf128.dir/cimagf128.cpp.o -c /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/complex/generic/cimagf128.cpp
In file included from /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/complex/generic/cimagf128.cpp:14:
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {
                   ^~~~~~~~~~~~~~~~~~~~~~
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
template <> struct make_complex<long double> {
                   ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
template <> struct make_real<cfloat128> {
                   ^~~~~~~~~~~~~~~~~~~~
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here
template <> struct make_real<_Complex long double> {
                   ^
2 errors generated.
[2/13] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf.dir/cimagf.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf.dir/cimagf.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -Iprojects/libc/src/complex/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/complex/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf.dir/cimagf.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf.dir/cimagf.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf.dir/cimagf.cpp.o -c /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/complex/generic/cimagf.cpp
In file included from /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/complex/generic/cimagf.cpp:12:
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {
                   ^~~~~~~~~~~~~~~~~~~~~~
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
template <> struct make_complex<long double> {
                   ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
template <> struct make_real<cfloat128> {
                   ^~~~~~~~~~~~~~~~~~~~
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here
template <> struct make_real<_Complex long double> {
                   ^
2 errors generated.
[3/13] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.dir/conjf.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.dir/conjf.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -Iprojects/libc/src/complex/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/complex/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.dir/conjf.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.dir/conjf.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.dir/conjf.cpp.o -c /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/complex/generic/conjf.cpp
In file included from /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/complex/generic/conjf.cpp:12:
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {

@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 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/12241

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)
...
[11/3934] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.posix_madvise.__internal__.dir/posix_madvise.cpp.o
[12/3934] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.munlockall.__internal__.dir/munlockall.cpp.o
[13/3934] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.madvise.__internal__.dir/madvise.cpp.o
[14/3934] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mremap.__internal__.dir/mremap.cpp.o
[15/3934] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.remap_file_pages.__internal__.dir/remap_file_pages.cpp.o
[16/3934] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.munlock.__internal__.dir/munlock.cpp.o
[17/3934] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mlock.__internal__.dir/mlock.cpp.o
[18/3934] Building CXX object projects/libc/src/sys/mman/linux/CMakeFiles/libc.src.sys.mman.linux.mlockall.__internal__.dir/mlockall.cpp.o
[19/3934] Building CXX object projects/libc/src/pthread/CMakeFiles/libc.src.pthread.pthread_attr_setstack.__internal__.dir/pthread_attr_setstack.cpp.o
[20/3934] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf128.dir/cimagf128.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf128.dir/cimagf128.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -Iprojects/libc/src/complex/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/complex/generic -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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf128.dir/cimagf128.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf128.dir/cimagf128.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.cimagf128.dir/cimagf128.cpp.o -c /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/complex/generic/cimagf128.cpp
In file included from /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/complex/generic/cimagf128.cpp:14:
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {
                   ^~~~~~~~~~~~~~~~~~~~~~
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
template <> struct make_complex<long double> {
                   ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
template <> struct make_real<cfloat128> {
                   ^~~~~~~~~~~~~~~~~~~~
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here
template <> struct make_real<_Complex long double> {
                   ^
2 errors generated.
[21/3934] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.__internal__.dir/conjl.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.__internal__.dir/conjl.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -Iprojects/libc/src/complex/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/complex/generic -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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.__internal__.dir/conjl.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.__internal__.dir/conjl.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.__internal__.dir/conjl.cpp.o -c /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/complex/generic/conjl.cpp
In file included from /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/complex/generic/conjl.cpp:12:
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {
                   ^~~~~~~~~~~~~~~~~~~~~~
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
template <> struct make_complex<long double> {
                   ^
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
template <> struct make_real<cfloat128> {
                   ^~~~~~~~~~~~~~~~~~~~
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here
template <> struct make_real<_Complex long double> {
                   ^
2 errors generated.
[22/3934] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.crealf128.__internal__.dir/crealf128.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.crealf128.__internal__.dir/crealf128.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -Iprojects/libc/src/complex/generic -I/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/complex/generic -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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.crealf128.__internal__.dir/crealf128.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.crealf128.__internal__.dir/crealf128.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.crealf128.__internal__.dir/crealf128.cpp.o -c /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/complex/generic/crealf128.cpp
In file included from /home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/complex/generic/crealf128.cpp:14:
/home/libc-buildbot/libc-aarch64-ubuntu/libc-aarch64-ubuntu-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {

@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 10, 2024

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

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

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)
...
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile
-- Configuring done
-- Generating done
-- Build files have been written to: /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/build
@@@BUILD_STEP build libc@@@
Running: ninja libc
[1/13] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf128.dir/conjf128.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf128.dir/conjf128.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_18_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/build/projects/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/build/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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf128.dir/conjf128.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf128.dir/conjf128.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf128.dir/conjf128.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/complex/generic/conjf128.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/complex/generic/conjf128.cpp:14:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {
                   ^~~~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
template <> struct make_complex<long double> {
                   ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
template <> struct make_real<cfloat128> {
                   ^~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here
template <> struct make_real<_Complex long double> {
                   ^
2 errors generated.
[2/13] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.crealf.dir/crealf.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.crealf.dir/crealf.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_18_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/build/projects/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/build/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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.crealf.dir/crealf.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.crealf.dir/crealf.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.crealf.dir/crealf.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/complex/generic/crealf.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/complex/generic/crealf.cpp:12:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {
                   ^~~~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
template <> struct make_complex<long double> {
                   ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
template <> struct make_real<cfloat128> {
                   ^~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here
template <> struct make_real<_Complex long double> {
                   ^
2 errors generated.
[3/13] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.dir/conjl.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.dir/conjl.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_18_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/build/projects/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/build/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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.dir/conjl.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.dir/conjl.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.dir/conjl.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/complex/generic/conjl.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/complex/generic/conjl.cpp:12:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {

@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 10, 2024

LLVM Buildbot has detected a new failure on builder libc-riscv32-qemu-yocto-fullbuild-dbg running on rv32gc-qemu-system while building libc at step 4 "annotate".

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

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)
...
[518/521] Building CXX object projects/libc/src/threads/linux/CMakeFiles/libc.src.threads.linux.cnd_destroy.dir/cnd_destroy.cpp.o
[519/521] Building CXX object projects/libc/src/threads/linux/CMakeFiles/libc.src.threads.linux.cnd_init.dir/cnd_init.cpp.o
[520/521] Building CXX object projects/libc/src/threads/linux/CMakeFiles/libc.src.threads.linux.cnd_broadcast.dir/cnd_broadcast.cpp.o
[521/521] Linking CXX static library projects/libc/lib/libc.a
@@@BUILD_STEP build libc-startup@@@
Running: ninja libc-startup
ninja: no work to do.
@@@BUILD_STEP libc-unit-tests@@@
Running: ninja libc-unit-tests
[1/3916] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o 
/usr/local/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/projects/libc/src/complex/generic -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/complex/generic -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc -isystem /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/projects/libc/include -mabi=ilp32d -march=rv32imafdc --target=riscv32-unknown-linux-gnu --sysroot=/opt/riscv/sysroot --gcc-toolchain=/opt/riscv -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 -std=c++17 --target=riscv32-unknown-linux-gnu -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter=/usr/include -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o -c /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/complex/generic/conj.cpp
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/complex/generic/conj.cpp:12:
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
   40 | template <> struct make_complex<float128> {
      |                    ^~~~~~~~~~~~~~~~~~~~~~
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
   30 | template <> struct make_complex<long double> {
      |                    ^
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
   65 | template <> struct make_real<cfloat128> {
      |                    ^~~~~~~~~~~~~~~~~~~~
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here
   55 | template <> struct make_real<_Complex long double> {
      |                    ^
2 errors generated.
[2/3916] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o 
/usr/local/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/projects/libc/src/complex/generic -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/complex/generic -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc -isystem /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/projects/libc/include -mabi=ilp32d -march=rv32imafdc --target=riscv32-unknown-linux-gnu --sysroot=/opt/riscv/sysroot --gcc-toolchain=/opt/riscv -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 -std=c++17 --target=riscv32-unknown-linux-gnu -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter=/usr/include -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o -c /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/complex/generic/conj.cpp
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/complex/generic/conj.cpp:12:
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
   40 | template <> struct make_complex<float128> {
      |                    ^~~~~~~~~~~~~~~~~~~~~~
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
   30 | template <> struct make_complex<long double> {
      |                    ^
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
   65 | template <> struct make_real<cfloat128> {
      |                    ^~~~~~~~~~~~~~~~~~~~
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here
   55 | template <> struct make_real<_Complex long double> {
      |                    ^
2 errors generated.
[3/3916] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.dir/conjl.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.dir/conjl.cpp.o 
/usr/local/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/projects/libc/src/complex/generic -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/complex/generic -I/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc -isystem /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/build/projects/libc/include -mabi=ilp32d -march=rv32imafdc --target=riscv32-unknown-linux-gnu --sysroot=/opt/riscv/sysroot --gcc-toolchain=/opt/riscv -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 -std=c++17 --target=riscv32-unknown-linux-gnu -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter=/usr/include -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.dir/conjl.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.dir/conjl.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjl.dir/conjl.cpp.o -c /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/complex/generic/conjl.cpp
In file included from /home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/complex/generic/conjl.cpp:12:
/home/libcrv32buildbot/bbroot/libc-riscv32-qemu-yocto-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
   40 | template <> struct make_complex<float128> {

@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 10, 2024

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

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

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)
...
[518/521] Building CXX object projects/libc/startup/linux/CMakeFiles/libc.startup.linux.do_start.dir/do_start.cpp.o
[519/521] Building CXX object projects/libc/startup/linux/riscv/CMakeFiles/libc.startup.linux.riscv.tls.dir/tls.cpp.o
[520/521] Linking CXX executable projects/libc/startup/linux/crt1.o
[521/521] Linking CXX static library projects/libc/lib/libc.a
@@@BUILD_STEP build libc-startup@@@
Running: ninja libc-startup
ninja: no work to do.
@@@BUILD_STEP libc-unit-tests@@@
Running: ninja libc-unit-tests
[1/4524] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.__internal__.dir/conjf.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.__internal__.dir/conjf.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/projects/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.__internal__.dir/conjf.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.__internal__.dir/conjf.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.__internal__.dir/conjf.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic/conjf.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic/conjf.cpp:12:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {
                   ^~~~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
template <> struct make_complex<long double> {
                   ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
template <> struct make_real<cfloat128> {
                   ^~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here
template <> struct make_real<_Complex long double> {
                   ^
2 errors generated.
[2/4524] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/projects/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic/conj.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic/conj.cpp:12:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {
                   ^~~~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
template <> struct make_complex<long double> {
                   ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
template <> struct make_real<cfloat128> {
                   ^~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here
template <> struct make_real<_Complex long double> {
                   ^
2 errors generated.
[3/4524] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/projects/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic/conj.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic/conj.cpp:12:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
@@@BUILD_STEP libc-unit-tests@@@
Running: ninja libc-unit-tests
[1/4524] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.__internal__.dir/conjf.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.__internal__.dir/conjf.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/projects/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.__internal__.dir/conjf.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.__internal__.dir/conjf.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conjf.__internal__.dir/conjf.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic/conjf.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic/conjf.cpp:12:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {
                   ^~~~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
template <> struct make_complex<long double> {
                   ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
template <> struct make_real<cfloat128> {
                   ^~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here
template <> struct make_real<_Complex long double> {
                   ^
2 errors generated.
[2/4524] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/projects/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -DLIBC_COPT_PUBLIC_PACKAGING -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.dir/conj.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic/conj.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic/conj.cpp:12:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {
                   ^~~~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
template <> struct make_complex<long double> {
                   ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
template <> struct make_real<cfloat128> {
                   ^~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here
template <> struct make_real<_Complex long double> {
                   ^
2 errors generated.
[3/4524] Building CXX object projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o
FAILED: projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o 
/usr/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/projects/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc -isystem /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/build/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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -O3 -std=c++17 -MD -MT projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o -MF projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o.d -o projects/libc/src/complex/generic/CMakeFiles/libc.src.complex.generic.conj.__internal__.dir/conj.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic/conj.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/complex/generic/conj.cpp:12:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:40:20: error: redefinition of 'make_complex<long double>'
template <> struct make_complex<float128> {
                   ^~~~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:30:20: note: previous definition is here
template <> struct make_complex<long double> {
                   ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:65:20: error: redefinition of 'make_real<_Complex long double>'
template <> struct make_real<cfloat128> {
                   ^~~~~~~~~~~~~~~~~~~~
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/complex_type.h:55:20: note: previous definition is here

Sh0g0-1758 added a commit that referenced this pull request Dec 10, 2024
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.

4 participants