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] |
The problem was the ADDR_EXPR of a CONSTRUCTOR was no longer considered constant for
some reason. This patch just marks the address expression as constant after building
the address expression.
OK? Tested on powerpc-apple-darwin and i686-pc-linux-gnu with no regressions.
Index: objc-act.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/objc/objc-act.c,v retrieving revision 1.232 diff -u -p -r1.232 objc-act.c --- objc-act.c 9 Jul 2004 23:32:38 -0000 1.232 +++ objc-act.c 18 Jul 2004 07:36:18 -0000 @@ -1453,7 +1453,9 @@ build_objc_string_object (tree string) = objc_add_static_instance (constructor, constant_string_type); }
- return (build_unary_op (ADDR_EXPR, constructor, 1)); + constructor = build_unary_op (ADDR_EXPR, constructor, 1); + TREE_CONSTANT (constructor) = true; + return constructor; }
/* Declare a static instance of CLASS_DECL initialized by CONSTRUCTOR. */
-------------------------------------------------------------- Ziemowit Laski 1 Infinite Loop, MS 301-2K Mac OS X Compiler Group Cupertino, CA USA 95014-2083 Apple Computer, Inc. +1.408.974.6229 Fax .5477
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |