Skip to content

DependencyTracker.cpp fails to build on error: static assertion failed due to requirement '3U <= PointerLikeTypeTraits<llvm::dwarflinker_parallel::CompileUnit *>::NumLowBitsAvailable': PointerIntPair with integer size too large for pointer #73267

Closed
@sylvestre

Description

@sylvestre

On linux debian i386 with 7f215b1:

/opt/sccache//sccache /build/source/build-llvm/./bin/clang++ -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/build/source/build-llvm/tools/clang/stage2-bins/lib/DWARFLinkerParallel -I/build/source/llvm/lib/DWARFLinkerParallel -I/build/source/build-llvm/tools/clang/stage2-bins/include -I/build/source/llvm/include -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -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 -ffunction-sections -fdata-sections -ffile-prefix-map=/build/source/build-llvm/tools/clang/stage2-bins=build-llvm/tools/clang/stage2-bins -ffile-prefix-map=/build/source/= -no-canonical-prefixes -O2 -DNDEBUG -g1 -std=c++17  -fno-exceptions -funwind-tables -MD -MT lib/DWARFLinkerParallel/CMakeFiles/LLVMDWARFLinkerParallel.dir/DependencyTracker.cpp.o -MF lib/DWARFLinkerParallel/CMakeFiles/LLVMDWARFLinkerParallel.dir/DependencyTracker.cpp.o.d -o lib/DWARFLinkerParallel/CMakeFiles/LLVMDWARFLinkerParallel.dir/DependencyTracker.cpp.o -c /build/source/llvm/lib/DWARFLinkerParallel/DependencyTracker.cpp
In file included from /build/source/llvm/lib/DWARFLinkerParallel/DependencyTracker.cpp:9:
In file included from /build/source/llvm/lib/DWARFLinkerParallel/DependencyTracker.h:12:
In file included from /build/source/llvm/lib/DWARFLinkerParallel/DWARFLinkerCompileUnit.h:12:
In file included from /build/source/llvm/lib/DWARFLinkerParallel/DWARFLinkerUnit.h:12:
In file included from /build/source/llvm/lib/DWARFLinkerParallel/DWARFLinkerGlobalData.h:12:
In file included from /build/source/llvm/lib/DWARFLinkerParallel/TypePool.h:15:
In file included from /build/source/llvm/include/llvm/CodeGen/DIE.h:17:
/build/source/llvm/include/llvm/ADT/PointerIntPair.h:172:17: error: static assertion failed due to requirement '3U <= PointerLikeTypeTraits<llvm::dwarflinker_parallel::CompileUnit *>::NumLowBitsAvailable': PointerIntPair with integer size too large for pointer
  172 |   static_assert(IntBits <= PtrTraits::NumLowBitsAvailable,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/source/llvm/include/llvm/ADT/PointerIntPair.h:103:13: note: in instantiation of template class 'llvm::PointerIntPairInfo<llvm::dwarflinker_parallel::CompileUnit *, 3, llvm::PointerLikeTypeTraits<llvm::dwarflinker_parallel::CompileUnit *>>' requested here
  103 |     Value = Info::updateInt(Value, static_cast<intptr_t>(IntVal));
      |             ^
/build/source/llvm/lib/DWARFLinkerParallel/DependencyTracker.h:138:14: note: in instantiation of member function 'llvm::PointerIntPair<llvm::dwarflinker_parallel::CompileUnit *, 3>::setInt' requested here
  138 |       RootCU.setInt(static_cast<uint8_t>(Action));
      |              ^
/build/source/llvm/include/llvm/ADT/PointerIntPair.h:172:25: note: expression evaluates to '3 <= 2'
  172 |   static_assert(IntBits <= PtrTraits::NumLowBitsAvailable,
      |                 ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/source/llvm/include/llvm/ADT/PointerIntPair.h:103:17: error: incomplete definition of type 'llvm::PointerIntPairInfo<llvm::dwarflinker_parallel::CompileUnit *, 3, llvm::PointerLikeTypeTraits<llvm::dwarflinker_parallel::CompileUnit *>>'
  103 |     Value = Info::updateInt(Value, static_cast<intptr_t>(IntVal));
      |             ~~~~^~
/build/source/llvm/lib/DWARFLinkerParallel/DependencyTracker.h:138:14: note: in instantiation of member function 'llvm::PointerIntPair<llvm::dwarflinker_parallel::CompileUnit *, 3>::setInt' requested here
  138 |       RootCU.setInt(static_cast<uint8_t>(Action));
      |              ^

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions