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: fix gcj ICE


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;


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