LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1321 - llvm-gcc crashes on packed bitfield in addNewBitField
Summary: llvm-gcc crashes on packed bitfield in addNewBitField
Status: RESOLVED FIXED
Alias: None
Product: new-bugs
Classification: Unclassified
Component: new bugs (show other bugs)
Version: unspecified
Hardware: Other Linux
: P normal
Assignee: Devang Patel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-10 13:54 PDT by Duncan Sands
Modified: 2010-02-22 12:51 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Sands 2007-04-10 13:54:42 PDT
testcase:

struct X {
  unsigned int e0 : 17;
  unsigned int e1 : 17;
  unsigned int e2 : 17;
  unsigned int e3 : 17;
  unsigned int e4 : 17;
  unsigned int e5 : 17;
  unsigned int e6 : 17;
  unsigned int e7 : 17;
} __attribute__((packed)) x;

Compiling with the llvm-gcc C compiler:
gcc/llvm-types.cpp:1184: void StructTypeConversionInfo::addNewBitField(unsigned 
int, unsigned int): Assertion `Size <= 64 && "Bitfield too large!"' failed.
packed17.c:10: internal compiler error: Aborted

Testcase reduced from Ada's s-pack17.
Comment 1 Devang Patel 2007-04-11 18:25:15 PDT
I am testing fix.