This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: partial fix for libgcj/7073
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: 18 Jun 2002 19:44:21 -0600
- Subject: Patch: partial fix for libgcj/7073
- Reply-to: tromey at redhat dot com
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. */