]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR java/23300.
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Aug 2005 16:06:43 +0000 (16:06 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Aug 2005 16:06:43 +0000 (16:06 +0000)
* expr.c (build_field_ref): Don't generate otable reference when
DECL_FIELD_OFFSET is 0.
* class.c (maybe_layout_super_class): Pass outer class to
do_resolve_class.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103160 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/class.c
gcc/java/expr.c

index f6c6915d2e2d7004e55aa7873e33411f0c458611..b21f08277ed80b3482731f421cc50c8c4dc3f1a3 100644 (file)
@@ -1,3 +1,11 @@
+2005-08-15  Tom Tromey  <tromey@redhat.com>
+
+       PR java/23300.
+       * expr.c (build_field_ref): Don't generate otable reference when
+       DECL_FIELD_OFFSET is 0.
+       * class.c (maybe_layout_super_class): Pass outer class to
+       do_resolve_class.
+
 2005-08-15  Tom Tromey  <tromey@redhat.com>
 
        * java-tree.h (LABEL_IN_SUBR): Removed.
index d7e22c2fccf6f007763e85ed2086eadb6df3be06..21945eb7fe3008939c3a88d2299806853a03ae3b 100644 (file)
@@ -2093,8 +2093,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);
index c5e48a8406d96179824c8682bbb33418112307fe..c29b8a30254cf0a936c43b09f62ff00ff8ceb1d1 100644 (file)
@@ -1688,13 +1688,7 @@ build_field_ref (tree self_value, tree self_class, tree name)
       tree base_type = promote_type (base_class);
       if (base_type != TREE_TYPE (self_value))
        self_value = fold (build1 (NOP_EXPR, base_type, self_value));
-      if (! flag_syntax_only
-         && (flag_indirect_dispatch
-             /* DECL_FIELD_OFFSET == 0 if we have no reference for
-                the field, perhaps because we couldn't find the class
-                in which the field is defined.  
-                FIXME: We should investigate this.  */
-             || DECL_FIELD_OFFSET (field_decl) == 0))
+      if (! flag_syntax_only && flag_indirect_dispatch)
        {
          tree otable_index
            = build_int_cst (NULL_TREE, get_symbol_table_index