OSDN Git Service

* class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Jul 2004 02:47:08 +0000 (02:47 +0000)
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Jul 2004 02:47:08 +0000 (02:47 +0000)
get internal error due to mismatched types.

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

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

index 01c337c..b805bf2 100644 (file)
@@ -1,5 +1,8 @@
 2004-07-07  Per Bothner  <per@bothner.com>
 
+       * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
+       get internal error due to mismatched types.
+
        * gcj.texi (Invoking gij):  Document new -verbose:class flag.
 
        * gcj.texi (Linking):   New node.  Document -lgij usage.
index 48f6b86..5e7c2b9 100644 (file)
@@ -1126,6 +1126,7 @@ build_static_field_ref (tree fdecl)
       ref = build (COMPONENT_REF, ptr_type_node,
                   ref, TREE_CHAIN (TYPE_FIELDS (field_info_union_node)),
                   NULL_TREE);
+      ref = build1 (NOP_EXPR, build_pointer_type (TREE_TYPE (fdecl)), ref);
       return fold (build1 (INDIRECT_REF, TREE_TYPE(fdecl), ref));
     }
 }