This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: fix gcj ICE
- From: Tom Tromey <tromey at redhat dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: java-patches at gcc dot gnu dot org
- Date: 11 Mar 2003 17:00:31 -0700
- Subject: Patch: fix gcj ICE
- Reply-to: tromey at redhat dot com
This patch fixes an ICE detect by the Jacks test suite.
Tested on x86 Red Hat Linux 7.3, including mauve and jacks.
There's no test case since this is covered by Jacks.
You won't see an improvement in the results due to a problem in the
Jacks test harness. I'm going to find out what to do about that -- it
should never allow a SEGV when a normal compiler error is required.
Ok for trunk? (Given that this is an ICE on illegal code only, I
don't think it is very important for 3.3.)
Tom
Index: gcc/java/ChangeLog
from Tom Tromey <tromey at redhat dot com>
* parse.y (resolve_inner_class): Error if qualifier is a primitive
type.
Index: gcc/java/parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.405.2.7
diff -u -r1.405.2.7 parse.y
--- gcc/java/parse.y 28 Feb 2003 20:53:07 -0000 1.405.2.7
+++ gcc/java/parse.y 10 Mar 2003 07:56:08 -0000
@@ -3579,9 +3579,16 @@
return decl;
}
- /* Now go to the upper classes, bail out if necessary. We will
+ /* Now go to the upper classes, bail out if necessary. We will
analyze the returned SUPER and act accordingly (see
- do_resolve_class.) */
+ do_resolve_class). */
+ if (JPRIMITIVE_TYPE_P (TREE_TYPE (local_enclosing))
+ || TREE_TYPE (local_enclosing) == void_type_node)
+ {
+ parse_error_context (cl, "Qualifier must be a reference");
+ local_enclosing = NULL_TREE;
+ break;
+ }
local_super = CLASSTYPE_SUPER (TREE_TYPE (local_enclosing));
if (!local_super || local_super == object_type_node)
break;