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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: partial fix for libgcj/7073


This partially fixes PR libgcj/7073.

We weren't recognizing `void' as a primitive type when looking at
`void.class'.  This caused us to generate incorrect bytecode.

I haven't yet investigated the main part of 7073.  However, testing
indicates it is a bug in libgcj (most probably a bug when we construct
a new class at runtime) and not the compiler.

I rebuilt libgcj with this and ran the test suite with no problems.
Ok to commit?

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	For PR libgcj/7073:
	* parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
	specially.

Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.387
diff -u -r1.387 parse.y
--- parse.y 13 Jun 2002 16:46:01 -0000 1.387
+++ parse.y 19 Jun 2002 00:52:02 -0000
@@ -14029,7 +14029,8 @@
   if (!(ref_type = resolve_type_during_patch (type)))
     return error_mark_node;
 
-  if (!flag_emit_class_files || JPRIMITIVE_TYPE_P (ref_type))
+  if (!flag_emit_class_files || JPRIMITIVE_TYPE_P (ref_type)
+      || TREE_CODE (ref_type) == VOID_TYPE)
     {
       tree dot = build_class_ref (ref_type);
       /* A class referenced by `foo.class' is initialized.  */


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