[cfe-dev] Incorrect alignment when accessing a bitfield member of an unaligned struct
Steven Watanabe
watanabesj at gmail.com
Wed Jun 27 11:45:53 PDT 2012
AMDG
Compiling the attached source with
clang -cc1 -emit-llvm test.c
generates incorrect code.
Note that the load is marked align 4,
even though it's actually unaligned.
The problem is that CodeGenFunction::EmitLValueForField
discards the alignment of base when calling
EmitLValueForBitfield.
In Christ,
Steven Watanabe
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.c
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120627/147d9e5e/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.ll
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120627/147d9e5e/attachment.ksh>
More information about the cfe-dev
mailing list