[llvm-commits] [dragonegg] r116294 - /dragonegg/trunk/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Mon Oct 11 21:53:31 PDT 2010
Author: baldrick
Date: Mon Oct 11 23:53:31 2010
New Revision: 116294
URL: http://llvm.org/viewvc/llvm-project?rev=116294&view=rev
Log:
Work around a miscompilation by gcc-4.4 when building in release mode.
Modified:
dragonegg/trunk/llvm-convert.cpp
Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=116294&r1=116293&r2=116294&view=diff
==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Mon Oct 11 23:53:31 2010
@@ -5516,10 +5516,14 @@
// Okay, everything is good. Return this as a bitfield if we can't
// return it as a normal l-value. (e.g. "struct X { int X : 32 };" ).
- if (BitfieldSize != LLVMValueBitSize || BitStart != 0)
- return LValue(FieldPtr, LVAlign, BitStart, BitfieldSize);
-
- return LValue(FieldPtr, LVAlign);
+ LValue LV(FieldPtr, LVAlign);
+ if (BitfieldSize != LLVMValueBitSize || BitStart != 0) {
+ // Writing these fields directly rather than using the appropriate LValue
+ // constructor works around a miscompilation by gcc-4.4 in Release mode.
+ LV.BitStart = BitStart;
+ LV.BitSize = BitfieldSize;
+ }
+ return LV;
}
LValue TreeToLLVM::EmitLV_DECL(tree exp) {
More information about the llvm-commits
mailing list