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


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

[PATCH] Java: minor verifier patch.


I checking in this small verifier patch.

./A

2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* verify.c (merge_types): Load the types to merge if necessary.

Index: verify.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/java/verify.c,v
retrieving revision 1.31
diff -u -p -r1.31 verify.c
--- verify.c	2000/08/16 00:05:29	1.31
+++ verify.c	2000/09/07 18:19:19
@@ -131,6 +131,20 @@ merge_types (type1, type2)
       tt1 = HANDLE_TO_CLASS_TYPE (TREE_TYPE (type1));
       tt2 = HANDLE_TO_CLASS_TYPE (TREE_TYPE (type2));
 
+      /* If tt{1,2} haven't been properly loaded, now is a good time
+         to do it. */
+      if (!TYPE_SIZE (tt1))
+	{
+	  load_class (tt1, 1);
+	  safe_layout_class (tt1);
+	}
+
+      if (!TYPE_SIZE (tt2))
+	{
+	  load_class (tt2, 1);
+	  safe_layout_class (tt2);
+	}
+
       if (TYPE_ARRAY_P (tt1) || TYPE_ARRAY_P (tt2))
 	{
 	  if (TYPE_ARRAY_P (tt1) == TYPE_ARRAY_P (tt2))

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