Skip to content

AST/Type.h:2308:33: note: the comparison reduces to '(32 <= 24)' - on linux i386 #129521

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

Closed
sylvestre opened this issue Mar 3, 2025 · 4 comments
Assignees
Labels
build-problem clang Clang issues not falling into any other category

Comments

@sylvestre
Copy link
Collaborator


/usr/bin/g++ -DCLANG_EXPORTS -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/lib/AST -I/build/source/clang/lib/AST -I/build/source/clang/include -I/build/source/build-llvm/tools/clang/include -I/build/source/build-llvm/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 -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -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 -ffunction-sections -fdata-sections -fdebug-prefix-map=/build/source/build-llvm=../ -fdebug-prefix-map=/build/source/= -no-canonical-prefixes -ffile-prefix-map=/build/source/build-llvm=../ -ffile-prefix-map=/build/source/= -no-canonical-prefixes -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -MD -MT tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ASTDiagnostic.cpp.o -MF tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ASTDiagnostic.cpp.o.d -o tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ASTDiagnostic.cpp.o -c /build/source/clang/lib/AST/ASTDiagnostic.cpp
In file included from /build/source/clang/include/clang/AST/ASTDiagnostic.h:12,
                 from /build/source/clang/lib/AST/ASTDiagnostic.cpp:13:
/build/source/clang/include/clang/AST/Type.h: In constructor 'clang::Type::Type(TypeClass, clang::QualType, clang::TypeDependence)':
/build/source/clang/include/clang/AST/Type.h:2308:33: error: static assertion failed: changing bitfields changed sizeof(Type)!
 2308 |     static_assert(sizeof(*this) <=
      |                   ~~~~~~~~~~~~~~^~
 2309 |                       alignof(decltype(*this)) + sizeof(ExtQualsTypeCommonBase),
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/source/clang/include/clang/AST/Type.h:2308:33: note: the comparison reduces to '(32 <= 24)'
@sylvestre
Copy link
Collaborator Author

regression range: 31bf16a..a557861

@sylvestre
Copy link
Collaborator Author

@4vtomat you touched this file recently in #100346
Can it be you?

@EugeneZelenko EugeneZelenko added clang Clang issues not falling into any other category build-problem and removed new issue labels Mar 3, 2025
@topperc
Copy link
Collaborator

topperc commented Mar 3, 2025

It is #100346. @4vtomat is probably asleep. I'll see if I can address this.

@topperc topperc self-assigned this Mar 3, 2025
@topperc
Copy link
Collaborator

topperc commented Mar 3, 2025

I believe the problem is that these two fields now require 33 bits instead of 32 bits so they got put in separate 32-bit pieces instead of one leaving a 13-bit hole.

    LLVM_PREFERRED_TYPE(TypeBitfields)                                                                          
    unsigned : NumTypeBits;                                                                                     
                                                                                                                
    /// Extra information which affects how the function is called, like                                        
    /// regparm and the calling convention.                                                                     
    LLVM_PREFERRED_TYPE(CallingConv)                                                                            
    unsigned ExtInfo : 14;

@topperc topperc closed this as completed in 2b509ec Mar 3, 2025
jph-13 pushed a commit to jph-13/llvm-project that referenced this issue Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-problem clang Clang issues not falling into any other category
Projects
None yet
Development

No branches or pull requests

4 participants