|
|
| Bugzilla Link |
594 |
| Resolution |
FIXED |
| Resolved on |
Feb 22, 2010 12:51 |
| Version |
1.0 |
| OS |
MacOS X |
Extended Description
This program is miscompiled by LLVM on powerpc. It appears that bitfields are
being layed out backwards by the CFE. This may be related to Bug 449. It
probably also affects Sparc. This testcase should be compiled with
-fno-strict-aliasing.
-Chris
struct X {
int A : 4;
int Z : 28;
};
void test(struct X *P, int A) {
P->A = A;
}
int main() {
int Y = ~0;
test((struct X*)&Y, 0);
printf("%x\n", Y);
}