[libc-commits] [libc] [llvm] [libc][math] Add floating-point cast independent of compiler runtime (PR #105152)

LLVM Continuous Integration via libc-commits libc-commits at lists.llvm.org
Mon Sep 23 10:48:21 PDT 2024


llvm-ci wrote:

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

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

<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)
...
-- 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-fullbuild-dbg/build
@@@BUILD_STEP build libc@@@
Running: ninja libc
[1/5] Building CXX object projects/libc/src/stdio/printf_core/CMakeFiles/libc.src.stdio.printf_core.converter.dir/converter.cpp.o
FAILED: projects/libc/src/stdio/printf_core/CMakeFiles/libc.src.stdio.printf_core.converter.dir/converter.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-fullbuild-dbg/build/projects/libc/src/stdio/printf_core -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core -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 -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -std=c++17 -MD -MT projects/libc/src/stdio/printf_core/CMakeFiles/libc.src.stdio.printf_core.converter.dir/converter.cpp.o -MF projects/libc/src/stdio/printf_core/CMakeFiles/libc.src.stdio.printf_core.converter.dir/converter.cpp.o.d -o projects/libc/src/stdio/printf_core/CMakeFiles/libc.src.stdio.printf_core.converter.dir/converter.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter.cpp:20:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter_atlas.h:29:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/float_dec_converter.h:16:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:17:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/dyadic_float.h:108:27: error: use of undeclared identifier 'float16'
    using FPBits = FPBits<float16>;
                          ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/dyadic_float.h:109:34: error: 'FPBits' is not a class, namespace, or enumeration
    using StorageType = typename FPBits::StorageType;
                                 ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/FPBits.h:801:8: note: 'FPBits' declared here
struct FPBits final : public internal::FPRepImpl<get_fp_type<T>(), FPBits<T>> {
       ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter.cpp:20:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter_atlas.h:29:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/float_dec_converter.h:16:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:17:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/dyadic_float.h:111:51: error: 'FPBits' is not a class, namespace, or enumeration
    constexpr int EXTRA_FRACTION_LEN = Bits - 1 - FPBits::FRACTION_LEN;
                                                  ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/FPBits.h:801:8: note: 'FPBits' declared here
struct FPBits final : public internal::FPRepImpl<get_fp_type<T>(), FPBits<T>> {
       ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter.cpp:20:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter_atlas.h:29:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/float_dec_converter.h:16:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:17:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/dyadic_float.h:114:14: error: 'FPBits' is not a class, namespace, or enumeration
      return FPBits::zero(sign).get_val();
             ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/FPBits.h:801:8: note: 'FPBits' declared here
struct FPBits final : public internal::FPRepImpl<get_fp_type<T>(), FPBits<T>> {
       ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter.cpp:20:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter_atlas.h:29:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/float_dec_converter.h:16:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:17:
Step 6 (build libc) failure: build libc (failure)
@@@BUILD_STEP build libc@@@
Running: ninja libc
[1/5] Building CXX object projects/libc/src/stdio/printf_core/CMakeFiles/libc.src.stdio.printf_core.converter.dir/converter.cpp.o
FAILED: projects/libc/src/stdio/printf_core/CMakeFiles/libc.src.stdio.printf_core.converter.dir/converter.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-fullbuild-dbg/build/projects/libc/src/stdio/printf_core -I/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core -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 -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -std=c++17 -MD -MT projects/libc/src/stdio/printf_core/CMakeFiles/libc.src.stdio.printf_core.converter.dir/converter.cpp.o -MF projects/libc/src/stdio/printf_core/CMakeFiles/libc.src.stdio.printf_core.converter.dir/converter.cpp.o.d -o projects/libc/src/stdio/printf_core/CMakeFiles/libc.src.stdio.printf_core.converter.dir/converter.cpp.o -c /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter.cpp
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter.cpp:20:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter_atlas.h:29:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/float_dec_converter.h:16:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:17:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/dyadic_float.h:108:27: error: use of undeclared identifier 'float16'
    using FPBits = FPBits<float16>;
                          ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/dyadic_float.h:109:34: error: 'FPBits' is not a class, namespace, or enumeration
    using StorageType = typename FPBits::StorageType;
                                 ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/FPBits.h:801:8: note: 'FPBits' declared here
struct FPBits final : public internal::FPRepImpl<get_fp_type<T>(), FPBits<T>> {
       ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter.cpp:20:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter_atlas.h:29:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/float_dec_converter.h:16:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:17:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/dyadic_float.h:111:51: error: 'FPBits' is not a class, namespace, or enumeration
    constexpr int EXTRA_FRACTION_LEN = Bits - 1 - FPBits::FRACTION_LEN;
                                                  ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/FPBits.h:801:8: note: 'FPBits' declared here
struct FPBits final : public internal::FPRepImpl<get_fp_type<T>(), FPBits<T>> {
       ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter.cpp:20:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter_atlas.h:29:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/float_dec_converter.h:16:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:17:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/dyadic_float.h:114:14: error: 'FPBits' is not a class, namespace, or enumeration
      return FPBits::zero(sign).get_val();
             ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/FPBits.h:801:8: note: 'FPBits' declared here
struct FPBits final : public internal::FPRepImpl<get_fp_type<T>(), FPBits<T>> {
       ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter.cpp:20:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter_atlas.h:29:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/float_dec_converter.h:16:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:17:
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/dyadic_float.h:118:24: error: 'FPBits' is not a class, namespace, or enumeration
    if (unbiased_exp + FPBits::EXP_BIAS >= FPBits::MAX_BIASED_EXPONENT) {
                       ^
/home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/FPBits.h:801:8: note: 'FPBits' declared here
struct FPBits final : public internal::FPRepImpl<get_fp_type<T>(), FPBits<T>> {
       ^
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter.cpp:20:
In file included from /home/libc_worker/libc-riscv64-debian/libc-riscv64-debian-fullbuild-dbg/llvm-project/libc/src/stdio/printf_core/converter_atlas.h:29:

```

</details>

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


More information about the libc-commits mailing list