[llvm-commits] [llvm-gcc-4.2] r45757 - in /llvm-gcc-4.2/trunk/gcc: llvm-types.cpp tree.c tree.h
Dale Johannesen
dalej at apple.com
Wed Jan 9 13:13:22 PST 2008
The patch below should address this problem, let me know.
On Jan 9, 2008, at 12:43 PM, Duncan Sands wrote:
>> + TREE_INT_CST_LOW(DECL_SIZE(Field)) <
>> + TREE_INT_CST_LOW(TYPE_SIZE(TREE_TYPE(Field))))
>
> This probably kills Ada (testing now), since the size doesn't have
> to be
> a constant in general (likewise in RestoreBaseClassFields).
Index: llvm-types.cpp
===================================================================
--- llvm-types.cpp (revision 45777)
+++ llvm-types.cpp (working copy)
@@ -1696,6 +1696,8 @@
TREE_CODE(TREE_TYPE(Field))==RECORD_TYPE &&
TYPE_SIZE(TREE_TYPE(Field)) &&
DECL_SIZE(Field) &&
+ TREE_CODE(DECL_SIZE(Field))==INTEGER_CST &&
+ TREE_CODE(TYPE_SIZE(TREE_TYPE(Field)))==INTEGER_CST &&
TREE_INT_CST_LOW(DECL_SIZE(Field)) <
TREE_INT_CST_LOW(TYPE_SIZE(TREE_TYPE(Field))))
TREE_TYPE(Field) = FixBaseClassField(Field);
More information about the llvm-commits
mailing list