diff options
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r-- | gcc/java/class.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c index c2bd62f7a73..a089112276e 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1011,6 +1011,11 @@ build_class_ref (tree type) abort (); prim_class = lookup_class (get_identifier (prim_class_name)); + /* We wrap the class in a NOP_EXPR, because it is a + type. We can't hold it in the COMPONENT_REF itself, + as that type must remain NULL. */ + prim_class = build1 (NOP_EXPR, prim_class, NULL_TREE); + return build3 (COMPONENT_REF, NULL_TREE, prim_class, TYPE_identifier_node, NULL_TREE); } @@ -1855,13 +1860,9 @@ make_class_data (tree type) PUSH_FIELD_VALUE (cons, "loader", null_pointer_node); PUSH_FIELD_VALUE (cons, "interface_count", build_int_cst (NULL_TREE, interface_len)); - PUSH_FIELD_VALUE - (cons, "state", - convert (byte_type_node, - build_int_cst (NULL_TREE, - flag_indirect_dispatch - ? JV_STATE_PRELOADING - : JV_STATE_COMPILED))); + PUSH_FIELD_VALUE (cons, "state", + convert (byte_type_node, + build_int_cst (NULL_TREE, JV_STATE_PRELOADING))); PUSH_FIELD_VALUE (cons, "thread", null_pointer_node); PUSH_FIELD_VALUE (cons, "depth", integer_zero_node); @@ -2088,8 +2089,9 @@ maybe_layout_super_class (tree super_class, tree this_class) DECL_SOURCE_LINE (this_decl), 0); #endif } - super_class = do_resolve_class (NULL_TREE, this_class, - super_class, NULL_TREE, this_wrap); + super_class + = do_resolve_class (DECL_CONTEXT (TYPE_NAME (this_class)), + this_class, super_class, NULL_TREE, this_wrap); if (!super_class) return NULL_TREE; /* FIXME, NULL_TREE not checked by caller. */ super_class = TREE_TYPE (super_class); |