[libc-commits] [libc] [libc] Implement CMPLX related macros (PR #156344)
LLVM Continuous Integration via libc-commits
libc-commits at lists.llvm.org
Thu Sep 4 19:16:52 PDT 2025
llvm-ci wrote:
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/29685
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[6103/6191] Running unit test libc.test.include.stdckdint_test.__unit__
[==========] Running 3 tests from 1 test suite.
[ RUN ] LlvmLibcStdCkdIntTest.Add
[ OK ] LlvmLibcStdCkdIntTest.Add (6 us)
[ RUN ] LlvmLibcStdCkdIntTest.Sub
[ OK ] LlvmLibcStdCkdIntTest.Sub (2 us)
[ RUN ] LlvmLibcStdCkdIntTest.Mul
[ OK ] LlvmLibcStdCkdIntTest.Mul (2 us)
Ran 3 tests. PASS: 3 FAIL: 0
[6104/6191] Building CXX object libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o
FAILED: libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -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/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -fext-numeric-literals -Wno-pedantic -DLIBC_TEST=UNIT -std=gnu++17 -MD -MT libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o -MF libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o.d -o libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_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/include/complex_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/UnitTest/Test.h:37,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/ErrnoCheckingTest.h:14,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/FPMatcher.h:20,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:10:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp: In member function ‘virtual void LlvmLibcComplexTest_CMPLXMacro::Run()’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/include/llvm-libc-macros/complex-macros.h:25:21: error: ‘__builtin_complex’ was not declared in this scope; did you mean ‘__builtin_toupper’?
25 | #define CMPLX(x, y) __builtin_complex((double)(x), (double)(y))
| ^~~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:423:7: note: in definition of macro ‘LIBC_TEST_SCAFFOLDING_’
423 | if (TEST) \
| ^~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:509:3: note: in expansion of macro ‘LIBC_TEST_MATCH_’
509 | LIBC_TEST_MATCH_(MATCHER, MATCH, #MATCHER, #MATCH, )
| ^~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/FPMatcher.h:266:3: note: in expansion of macro ‘EXPECT_THAT’
266 | EXPECT_THAT(actual, LIBC_NAMESPACE::testing::getMatcherComplex< \
| ^~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:22:3: note: in expansion of macro ‘EXPECT_CFP_EQ’
22 | EXPECT_CFP_EQ(CMPLX(0, 1.0), I);
| ^~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:22:17: note: in expansion of macro ‘CMPLX’
22 | EXPECT_CFP_EQ(CMPLX(0, 1.0), I);
| ^~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/include/llvm-libc-macros/complex-macros.h:25:21: error: ‘__builtin_complex’ was not declared in this scope; did you mean ‘__builtin_toupper’?
25 | #define CMPLX(x, y) __builtin_complex((double)(x), (double)(y))
| ^~~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:423:7: note: in definition of macro ‘LIBC_TEST_SCAFFOLDING_’
423 | if (TEST) \
| ^~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:509:3: note: in expansion of macro ‘LIBC_TEST_MATCH_’
509 | LIBC_TEST_MATCH_(MATCHER, MATCH, #MATCHER, #MATCH, )
| ^~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/FPMatcher.h:266:3: note: in expansion of macro ‘EXPECT_THAT’
266 | EXPECT_THAT(actual, LIBC_NAMESPACE::testing::getMatcherComplex< \
| ^~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:23:3: note: in expansion of macro ‘EXPECT_CFP_EQ’
23 | EXPECT_CFP_EQ(CMPLX(1.0, 0), 1.0);
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[6103/6191] Running unit test libc.test.include.stdckdint_test.__unit__
[==========] Running 3 tests from 1 test suite.
[ RUN ] LlvmLibcStdCkdIntTest.Add
[ OK ] LlvmLibcStdCkdIntTest.Add (6 us)
[ RUN ] LlvmLibcStdCkdIntTest.Sub
[ OK ] LlvmLibcStdCkdIntTest.Sub (2 us)
[ RUN ] LlvmLibcStdCkdIntTest.Mul
[ OK ] LlvmLibcStdCkdIntTest.Mul (2 us)
Ran 3 tests. PASS: 3 FAIL: 0
[6104/6191] Building CXX object libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o
FAILED: libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -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/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -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 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -fpie -DLIBC_FULL_BUILD -ffreestanding -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -fext-numeric-literals -Wno-pedantic -DLIBC_TEST=UNIT -std=gnu++17 -MD -MT libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o -MF libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_test.cpp.o.d -o libc/test/include/CMakeFiles/libc.test.include.complex_test.__unit__.__build__.dir/complex_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/include/complex_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/UnitTest/Test.h:37,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/ErrnoCheckingTest.h:14,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/FPMatcher.h:20,
from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:10:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp: In member function ‘virtual void LlvmLibcComplexTest_CMPLXMacro::Run()’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/include/llvm-libc-macros/complex-macros.h:25:21: error: ‘__builtin_complex’ was not declared in this scope; did you mean ‘__builtin_toupper’?
25 | #define CMPLX(x, y) __builtin_complex((double)(x), (double)(y))
| ^~~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:423:7: note: in definition of macro ‘LIBC_TEST_SCAFFOLDING_’
423 | if (TEST) \
| ^~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:509:3: note: in expansion of macro ‘LIBC_TEST_MATCH_’
509 | LIBC_TEST_MATCH_(MATCHER, MATCH, #MATCHER, #MATCH, )
| ^~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/FPMatcher.h:266:3: note: in expansion of macro ‘EXPECT_THAT’
266 | EXPECT_THAT(actual, LIBC_NAMESPACE::testing::getMatcherComplex< \
| ^~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:22:3: note: in expansion of macro ‘EXPECT_CFP_EQ’
22 | EXPECT_CFP_EQ(CMPLX(0, 1.0), I);
| ^~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:22:17: note: in expansion of macro ‘CMPLX’
22 | EXPECT_CFP_EQ(CMPLX(0, 1.0), I);
| ^~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/include/llvm-libc-macros/complex-macros.h:25:21: error: ‘__builtin_complex’ was not declared in this scope; did you mean ‘__builtin_toupper’?
25 | #define CMPLX(x, y) __builtin_complex((double)(x), (double)(y))
| ^~~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:423:7: note: in definition of macro ‘LIBC_TEST_SCAFFOLDING_’
423 | if (TEST) \
| ^~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/LibcTest.h:509:3: note: in expansion of macro ‘LIBC_TEST_MATCH_’
509 | LIBC_TEST_MATCH_(MATCHER, MATCH, #MATCHER, #MATCH, )
| ^~~~~~~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/UnitTest/FPMatcher.h:266:3: note: in expansion of macro ‘EXPECT_THAT’
266 | EXPECT_THAT(actual, LIBC_NAMESPACE::testing::getMatcherComplex< \
| ^~~~~~~~~~~
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/test/include/complex_test.cpp:23:3: note: in expansion of macro ‘EXPECT_CFP_EQ’
23 | EXPECT_CFP_EQ(CMPLX(1.0, 0), 1.0);
```
</details>
https://github.com/llvm/llvm-project/pull/156344
More information about the libc-commits
mailing list