This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

Fix libgcj testsuite regression: stringconst2.java


Bryce's enabling indirect dispatch in the libgcj testuite revealed a
regression -- we weren't initializing static fields.

Andrew.



2006-05-04  Andrew Haley  <aph@redhat.com>

	* class.c (make_field_value): Always build_address_of fdecl if
	there is an initializer.

Index: gcc/java/class.c
===================================================================
--- gcc/java/class.c    (revision 113252)
+++ gcc/java/class.c    (working copy)
@@ -1344,7 +1344,8 @@
 
   {
     tree field_address = integer_zero_node;
-    if (! flag_indirect_classes && FIELD_STATIC (fdecl))
+    if ((DECL_INITIAL (fdecl) || ! flag_indirect_classes) 
+       && FIELD_STATIC (fdecl))
       field_address = build_address_of (fdecl);
 
     PUSH_FIELD_VALUE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]