This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: fix for Mauve build failure


Consider this program:

    public class a
    {
      Object z ()
      {
	return new Byte (Byte.MIN_VALUE);
      }
    }

The current gcj fails to compile this.  I tracked down the bug and
wrote the appended patch.  This is based on my observation that
java_complete_tree does its own handling of DECL_INITIAL; in fact it
has special code to handle this case specifically.

I rebuilt libgcj with this change and it built ok.

Ok to commit?

2000-06-26  Tom Tromey  <tromey@cygnus.com>

	* parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
	java_complete_tree.

Tom

Index: parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
retrieving revision 1.183
diff -u -r1.183 parse.y
--- parse.y	2000/06/26 16:39:28	1.183
+++ parse.y	2000/06/26 21:36:56
@@ -8729,7 +8729,7 @@
 	  && JPRIMITIVE_TYPE_P (TREE_TYPE (decl))
 	  && DECL_INITIAL (decl))
 	{
-	  field_ref = java_complete_tree (DECL_INITIAL (decl));
+	  field_ref = java_complete_tree (decl);
 	  static_final_found = 1;
 	}
       else

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]