aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/java/typeck.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/java/typeck.c b/gcc/java/typeck.c
index 7dab3f25..8d99fd8 100644
--- a/gcc/java/typeck.c
+++ b/gcc/java/typeck.c
@@ -404,7 +404,12 @@ build_java_array_type (element_type, length)
TYPE_ALIGN (t) = TYPE_ALIGN (element_type);
pop_obstacks ();
- layout_class (t);
+ /* We could layout_class, but that loads java.lang.Object prematurely.
+ * This is called by the parser, and it is a bad idea to do load_class
+ * in the middle of parsing, because of possible circularity problems. */
+ push_super_field (t, object_type_node);
+ layout_type (t);
+
return t;
}