[llvm-commits] [llvm-gcc-4.2] r104523 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Stuart Hastings
stuart at apple.com
Mon May 24 11:51:26 PDT 2010
On May 24, 2010, at 11:43 AM, Chris Lattner wrote:
>
> On May 24, 2010, at 11:25 AM, Stuart Hastings wrote:
>
>> Author: stuart
>> Date: Mon May 24 13:25:58 2010
>> New Revision: 104523
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=104523&view=rev
>> Log:
>> Fix and off-by-one bug in bitfield handling. Radar 7980096.
>
> Testcase please.
I've been thinking about that. The signature difference made by the patch is that the bitfield load-byte should be one byte above the store (-word). I'm looking at the existing bitfield test cases; is there an existing FrontendC test case that looks for something similar?
stuart
>
> -Chris
>
>>
>> Modified:
>> llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
>>
>> Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=104523&r1=104522&r2=104523&view=diff
>> ==============================================================================
>> --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
>> +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon May 24 13:25:58 2010
>> @@ -7304,7 +7304,7 @@
>> // adjust FieldPtr so that it is close enough to the bitfield that
>> // *FieldPtr contains the first needed bit. Be careful to make sure that
>> // the pointer remains appropriately aligned.
>> - if (BitStart > LLVMValueBitSize) {
>> + if (BitStart >= LLVMValueBitSize) {
>> // In this case, we know that the alignment of the field is less than
>> // the size of the field. To get the pointer close enough, add some
>> // number of alignment units to the pointer.
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list