Bugzilla – Bug 377
[llvmgcc] miscompilation of staticly initialized unsigned bitfields
Last modified: 2004-06-20 14:06:03
You need to log in before you can comment on or make changes to this bug.
If you compile all of the source files in 124.m88ksim but instab.c with a native compiler, compile instab.c with llvmgcc, and link the results, it does not work. All of the other source files in the program seem to be fine though. -Chris
Here is a reduced testcase: struct T { unsigned X : 5; unsigned Y : 6; unsigned Z : 5; }; struct T GV = { 1, 5, 1 }; It looks like static initializers for bitfields are not happy. -Chris
Fixed. Patch here: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040614/015335.html Testcase here: SingleSource/UnitTests/2004-06-20-StaticBitfieldInit.c With this bugfix, 124.m88ksim now works with LLVM. -Chris