This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Fix libgcj testsuite regression: stringconst2.java
- From: Andrew Haley <aph at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Thu, 4 May 2006 15:50:03 +0100
- Subject: 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