[llvm-commits] [llvm-gcc-4.2] r69398 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Chris Lattner
sabre at nondot.org
Fri Apr 17 16:11:43 PDT 2009
Author: lattner
Date: Fri Apr 17 18:11:43 2009
New Revision: 69398
URL: http://llvm.org/viewvc/llvm-project?rev=69398&view=rev
Log:
fix miscompile of 471.omnetpp, and
llvm-test/SingleSource/UnitTests/2009-04-16-BitfieldInitialization.c:t8.
when natural llvm alignment in structs will round up, we need
to take into account this rounding.
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=69398&r1=69397&r2=69398&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Apr 17 18:11:43 2009
@@ -6922,6 +6922,7 @@
// at the right offset now.
assert(LLVMNaturalByteOffset*8 == GCCFieldOffsetInBits);
ResultElts.push_back(Val);
+ NextFieldByteStart = LLVMNaturalByteOffset;
NextFieldByteStart += TD.getTypePaddedSize(Val->getType());
}
More information about the llvm-commits
mailing list