This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch to fix compiling inner classes from bytecode
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Subject: patch to fix compiling inner classes from bytecode
- From: Per Bothner <per at bothner dot com>
- Date: 19 Mar 2001 14:13:26 -0800
This fixes the bug Tom mentioned, and brings the number of
testsuite failures down quite a bit.
Checked into both the trunk and the gcc3 branch.
2001-03-19 Per Bothner <per@bothner.com>
* jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
before trying to load an inner class.
Index: jcf-parse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/jcf-parse.c,v
retrieving revision 1.76.2.2
diff -u -p -r1.76.2.2 jcf-parse.c
--- jcf-parse.c 2001/03/19 17:20:01 1.76.2.2
+++ jcf-parse.c 2001/03/19 21:48:46
@@ -728,7 +728,8 @@ load_inner_classes (cur_class)
{
tree name = DECL_NAME (TREE_PURPOSE (current));
tree decl = IDENTIFIER_GLOBAL_VALUE (name);
- if (decl && !CLASS_BEING_LAIDOUT (TREE_TYPE (decl)))
+ if (decl && ! CLASS_LOADED_P (TREE_TYPE (decl))
+ && !CLASS_BEING_LAIDOUT (TREE_TYPE (decl)))
load_class (name, 1);
}
}
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/