Author: johannes Date: Mon Jan 21 16:03:58 2008 New Revision: 46219 URL: http://llvm.org/viewvc/llvm-project?rev=46219&view=rev Log: Fix 2 testsuite crashes where initializer size was != size of its type.
Modified: llvm-gcc-4.2/trunk/gcc/objc/objc-act.c Modified: llvm-gcc-4.2/trunk/gcc/objc/objc-act.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/objc/objc-act.c?rev=46219&r1=46218&r2=46219&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/objc/objc-act.c (original) +++ llvm-gcc-4.2/trunk/gcc/objc/objc-act.c Mon Jan 21 16:03:58 2008 @@ -10567,7 +10567,10 @@ obstack_free (&util_obstack, util_firstobj); /* Set offset. */ - ivar = tree_cons (NULL_TREE, byte_position (field_decl), ivar); +/* LLVM LOCAL begin make initializer size match type size */ + ivar = tree_cons (NULL_TREE, convert (integer_type_node, + byte_position (field_decl)), ivar); +/* LLVM LOCAL end */ initlist = tree_cons (NULL_TREE, objc_build_constructor (type, nreverse (ivar)), initlist); @@ -10836,8 +10839,13 @@ decl = start_var_decl (type, synth_id_with_class_suffix (name, objc_implementation_context)); + /* LLVM LOCAL begin make initializer size match type size */ /* APPLE LOCAL ObjC new abi */ - initlist = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, init_val)); + initlist = build_tree_list (NULL_TREE, build_int_cst (newabi + ? NULL_TREE + : ptr_type_node, + init_val)); + /* LLVM LOCAL end */ initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, size), initlist); initlist = tree_cons (NULL_TREE, list, initlist); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits