[llvm] [CodeGen] Get rid of incorrect `std` template specializations (PR #160804)
LLVM Continuous Integration via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 28 06:55:19 PDT 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `llvm` at step 9 "Add check check-llvm".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/31501
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 9 (Add check check-llvm) failure: test (failure)
...
[723/738] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
[724/738] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
[725/738] Linking CXX executable unittests/Target/X86/X86Tests
[726/738] Linking CXX executable unittests/MIR/MIRTests
[727/738] Linking CXX executable unittests/Passes/Plugins/PluginsTests
[728/738] Linking CXX executable unittests/ExecutionEngine/MCJIT/MCJITTests
[729/738] Linking CXX executable unittests/MI/MITests
[730/738] Linking CXX executable unittests/tools/llvm-mca/LLVMMCATests
[731/738] Linking CXX executable unittests/tools/llvm-exegesis/LLVMExegesisTests
[732/738] Building CXX object unittests/CodeGen/CMakeFiles/CodeGenTests.dir/TypeTraitsTest.cpp.o
FAILED: unittests/CodeGen/CMakeFiles/CodeGenTests.dir/TypeTraitsTest.cpp.o
ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iunittests/CodeGen -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/CodeGen -Iinclude -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/third-party/unittest/googletest/include -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-array-bounds -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wno-dangling-else -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++1z -MD -MT unittests/CodeGen/CMakeFiles/CodeGenTests.dir/TypeTraitsTest.cpp.o -MF unittests/CodeGen/CMakeFiles/CodeGenTests.dir/TypeTraitsTest.cpp.o.d -o unittests/CodeGen/CMakeFiles/CodeGenTests.dir/TypeTraitsTest.cpp.o -c /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/CodeGen/TypeTraitsTest.cpp
In file included from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/CodeGen/TypeTraitsTest.cpp:11:0:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/CodeGen/ScheduleDAG.h:321:40: warning: ‘llvm::SUnit::SchedulingPref’ is too small to hold all values of ‘enum llvm::Sched::Preference’
Sched::Preference SchedulingPref : 4; ///< Scheduling preference.
^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/CodeGen/TypeTraitsTest.cpp:57:1: error: non-constant condition for static assertion
static_assert(CheckStdCmpRequirements<std::less<rdf::RegisterRef>>(),
^~~~~~~~~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/CodeGen/TypeTraitsTest.cpp:57:67: error: ‘constexpr bool CheckStdCmpRequirements() [with Fn = std::less<llvm::rdf::RegisterRef>]’ called in a constant expression
static_assert(CheckStdCmpRequirements<std::less<rdf::RegisterRef>>(),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/CodeGen/TypeTraitsTest.cpp:39:36: note: ‘constexpr bool CheckStdCmpRequirements() [with Fn = std::less<llvm::rdf::RegisterRef>]’ is not usable as a constexpr function because:
template <class Fn> constexpr bool CheckStdCmpRequirements() {
^~~~~~~~~~~~~~~~~~~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/CodeGen/TypeTraitsTest.cpp:42:6: error: uninitialized variable ‘f1’ in ‘constexpr’ function
Fn f1;
^~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/CodeGen/TypeTraitsTest.cpp:59:1: error: non-constant condition for static assertion
static_assert(CheckStdCmpRequirements<std::equal_to<rdf::RegisterRef>>(),
^~~~~~~~~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/CodeGen/TypeTraitsTest.cpp:59:71: error: ‘constexpr bool CheckStdCmpRequirements() [with Fn = std::equal_to<llvm::rdf::RegisterRef>]’ called in a constant expression
static_assert(CheckStdCmpRequirements<std::equal_to<rdf::RegisterRef>>(),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/CodeGen/TypeTraitsTest.cpp:39:36: note: ‘constexpr bool CheckStdCmpRequirements() [with Fn = std::equal_to<llvm::rdf::RegisterRef>]’ is not usable as a constexpr function because:
template <class Fn> constexpr bool CheckStdCmpRequirements() {
^~~~~~~~~~~~~~~~~~~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/unittests/CodeGen/TypeTraitsTest.cpp:42:6: error: uninitialized variable ‘f1’ in ‘constexpr’ function
Fn f1;
^~
[733/738] Linking CXX executable unittests/CodeGen/CGPluginTest/CGPluginTest
[734/738] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
[735/738] Linking CXX executable unittests/Target/TargetMachineCTests
[736/738] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
ninja: build stopped: subcommand failed.
```
</details>
https://github.com/llvm/llvm-project/pull/160804
More information about the llvm-commits
mailing list