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]

[PATCH] Java: miscellaneous patch and java/2333 fix



I recently found some regressions with jc1. Here's a patch that fixes
two and also was accepted as a fix to java/2333:

  http://gcc.gnu.org/ml/gcc-bugs/2001-03/msg00597.html

I'm checking this in.

./A

2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>

	* class.c (layout_class): Fixed push_super_field's second
	argument. Fixes 2333.
	(jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
	too early to lay innerclasses out.

Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.95
diff -u -p -r1.95 class.c
--- class.c	2001/03/19 23:50:03	1.95
+++ class.c	2001/03/21 23:00:31
@@ -1693,7 +1693,7 @@ layout_class (this_class)
 	  return;
 	}
       if (TYPE_SIZE (this_class) == NULL_TREE)
-	push_super_field (this_class, super_class);
+	push_super_field (this_class, maybe_super_class);
     }
 
   for (field = TYPE_FIELDS (this_class);
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.263
diff -u -p -r1.263 parse.y
--- parse.y	2001/03/19 21:57:36	1.263
+++ parse.y	2001/03/21 23:01:07
@@ -5277,7 +5277,11 @@ jdep_resolve_class (dep)
     {
       tree inner = TREE_TYPE (decl);
       if (! CLASS_LOADED_P (inner))
-	safe_layout_class (inner);
+	{
+	  safe_layout_class (inner);
+	  if (TYPE_SIZE (inner) == error_mark_node)
+	    TYPE_SIZE (inner) = NULL_TREE;
+	}
       check_inner_class_access (decl, JDEP_ENCLOSING (dep), JDEP_WFL (dep));
     }
   return decl;


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