This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
From objc-act.c: /* For the NeXT runtime, we can generate a literal reference to the string class, don't need to run a constructor. */
Since we can do that we need to actually make the constructor tree actually use the fields since the middle end will crash without it. This patch just adds the fields to the purpose of the lists.
Tested on both powerpc-apple-darwin with no regressions and on i686-pc-linux-gnu with no regressions. OK?
Thanks, Andrew Pinski
* objc/objc-act.c (build_objc_string_object): Add the fields to the purpose of the list for the constructor.
Index: objc-act.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/objc/objc-act.c,v retrieving revision 1.137.2.36 diff -u -p -r1.137.2.36 objc-act.c --- objc-act.c 1 Apr 2004 17:21:36 -0000 1.137.2.36 +++ objc-act.c 12 Apr 2004 21:14:59 -0000 @@ -1381,6 +1381,7 @@ build_objc_string_object (tree string) { tree initlist, constructor, constant_string_class; int length; + tree fields;
@@ -1410,6 +1411,7 @@ build_objc_string_object (tree string) } add_class_reference (constant_string_id); } + fields = TYPE_FIELDS (constant_string_type);
@@ -1425,18 +1427,23 @@ build_objc_string_object (tree string) return error_mark_node; } initlist = build_tree_list - (NULL_TREE, + (fields, copy_node (build_unary_op (ADDR_EXPR, string_class_decl, 0))); } else { - initlist = build_tree_list (NULL_TREE, build_int_2 (0, 0)); + initlist = build_tree_list (fields, build_int_2 (0, 0)); }
Attachment:
fixstring.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |