PR java/22460: GCJ produces mis-match (non compatible) types in MODIFY_EXPR (from byte-code)

Andrew Haley aph@redhat.com
Fri Jul 15 14:07:00 GMT 2005


2005-07-15  Andrew Haley  <aph@redhat.com>

	* expr.c (expand_load_internal): Convert pointer to
          destination type.

Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.231
diff -u -p -r1.231 expr.c
--- expr.c	2 Jul 2005 10:55:06 -0000	1.231
+++ expr.c	15 Jul 2005 14:05:42 -0000
@@ -1321,7 +1321,7 @@ expand_load_internal (int index, tree ty
      value into it.  Then we push this new local on the stack.
      Hopefully this all gets optimized out.  */
   copy = build_decl (VAR_DECL, NULL_TREE, type);
-  if (INTEGRAL_TYPE_P (type)
+  if (INTEGRAL_TYPE_P (type) || POINTER_TYPE_P (type)
       && TREE_TYPE (copy) != TREE_TYPE (var))
     var = convert (type, var);
   java_add_local_var (copy);



More information about the Java-patches mailing list