[LLVMbugs] [Bug 23505] New: Large bitfield: Assertion `getActiveBits() <= 64 && "Too many bits for uint64_t"' failed.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue May 12 14:13:38 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23505
Bug ID: 23505
Summary: Large bitfield: Assertion `getActiveBits() <= 64 &&
"Too many bits for uint64_t"' failed.
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: hstong at ca.ibm.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Assertion `getActiveBits() <= 64 && "Too many bits for uint64_t"' failed.
### SOURCE (<stdin>):
struct A { int : 1 + (unsigned __int128)0xffffffffffffffff; };
### COMPILER INVOCATION:
clang -cc1 -fsyntax-only -x c -
### ACTUAL OUTPUT:
clang: /llvm_trunk/llvm/include/llvm/ADT/APInt.h:1323: uint64_t
llvm::APInt::getZExtValue() const: Assertion `getActiveBits() <= 64 && "Too
many bits for uint64_t"' failed.
0 clang 0x0000000012ea5124 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
+ 132
1 clang 0x0000000012ea6230
2 clang 0x0000000012ea3b34
3 0x00003fffa0e40478 __kernel_sigtramp_rt64 + 0
4 libc.so.6 0x00003fffa08b072c abort + 636
5 libc.so.6 0x00003fffa08a46e4
6 libc.so.6 0x00003fffa08a47d4 __assert_fail + 100
7 clang 0x00000000106cfb48
8 clang 0x00000000106d4068
9 clang 0x0000000010987948
clang::Sema::VerifyBitField(clang::SourceLocation, clang::IdentifierInfo*,
clang::QualType, bool, clang::Expr*, bool*) + 888
10 clang 0x000000001099612c
clang::Sema::CheckFieldDecl(clang::DeclarationName, clang::QualType,
clang::TypeSourceInfo*, clang::RecordDecl*, clang::SourceLocation, bool,
clang::Expr*, clang::InClassInitStyle, clang::SourceLocation,
clang::AccessSpecifier, clang::NamedDecl*, clang::Declarator*) + 1276
11 clang 0x00000000109967dc clang::Sema::HandleField(clang::Scope*,
clang::RecordDecl*, clang::SourceLocation, clang::Declarator&, clang::Expr*,
clang::InClassInitStyle, clang::AccessSpecifier) + 572
12 clang 0x0000000010996c88 clang::Sema::ActOnField(clang::Scope*,
clang::Decl*, clang::SourceLocation, clang::Declarator&, clang::Expr*) + 56
13 clang 0x000000001082ba30
14 clang 0x00000000108419e4
clang::Parser::ParseStructDeclaration(clang::ParsingDeclSpec&,
llvm::function_ref<void (clang::ParsingFieldDeclarator&)>) + 580
15 clang 0x0000000010841fe0
clang::Parser::ParseStructUnionBody(clang::SourceLocation, unsigned int,
clang::Decl*) + 768
16 clang 0x00000000108571ac
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 4844
17 clang 0x000000001083a244
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 4788
18 clang 0x000000001082458c
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 108
19 clang 0x0000000010824d14
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 884
20 clang 0x0000000010829980
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1584
21 clang 0x000000001082a14c
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 572
22 clang 0x0000000010820218 clang::ParseAST(clang::Sema&, bool, bool) + 584
23 clang 0x0000000010384924 clang::ASTFrontendAction::ExecuteAction() + 132
24 clang 0x0000000010385d28 clang::FrontendAction::Execute() + 248
25 clang 0x000000001035bf44
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 468
26 clang 0x000000001033c378
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2328
27 clang 0x0000000010332ea8 cc1_main(llvm::ArrayRef<char const*>, char
const*, void*) + 1640
28 clang 0x0000000010303f9c main + 4604
29 libc.so.6 0x00003fffa0894580
30 libc.so.6 0x00003fffa0894774 __libc_start_main + 196
Stack dump:
0. Program arguments: /bldtrunk/Release+Asserts/bin/clang -cc1
-fsyntax-only -x c -
1. <stdin>:1:59: current parser token ';'
2. <stdin>:1:1: parsing struct/union body 'A'
### EXPECTED OUTPUT:
<stdin>:1:12: error: size of anonymous bit-field (18446744073709551616 bits)
exceeds size of its type (32 bits)
struct A { int : 1 + (unsigned __int128)0xffffffffffffffff; };
^
1 error generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150512/ebd44b9c/attachment.html>
More information about the llvm-bugs
mailing list