[llvm-commits] CVS: gcc-3.4/gcc/llvm-expand.c
Chris Lattner
lattner at cs.uiuc.edu
Mon Mar 8 18:56:01 PST 2004
Changes in directory gcc-3.4/gcc:
llvm-expand.c updated: 1.21 -> 1.22
---
Log message:
It seems that GCC defines invariants just to break them. Why require the
LHS and RHS of an assignment to be the same type, that's just SOOO restricting.
*sigh*. This fixes Bug 261.
---
Diffs of the changes: (+5 -0)
Index: gcc-3.4/gcc/llvm-expand.c
diff -u gcc-3.4/gcc/llvm-expand.c:1.21 gcc-3.4/gcc/llvm-expand.c:1.22
--- gcc-3.4/gcc/llvm-expand.c:1.21 Sun Mar 7 22:50:58 2004
+++ gcc-3.4/gcc/llvm-expand.c Mon Mar 8 18:55:07 2004
@@ -5606,6 +5606,11 @@
} else if (DestLoc) { /* Generating structure, using value */
unsigned Align = TYPE_ALIGN(TREE_TYPE(exp))/8;
assert(BitSize == 0 && "Invalid bitfield read of composite value!");
+
+ /* If the destination location is not exactly the same type as the
+ * source value, cast the destination pointer.
+ */
+ DestLoc = cast_if_type_not_equal(Fn, DestLoc, op0->Ty);
llvm_copy_aggregate(Fn, DestLoc, op0, expVolatile, 0, Align);
}
}
More information about the llvm-commits
mailing list