This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
PR13948: A Fix
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: green at redhat dot com
- Cc: java at gcc dot gnu dot org
- Date: Fri, 11 Jun 2004 16:47:56 +0530
- Subject: PR13948: A Fix
Hi Anthony,
The following fixed the ICE in PR13948 for me - can you
please check if it fixes the ICE in the java-gnome build
for you too? (I am fairly confident it will.)
----------------------------- 8< -----------------------------
Index: parse.y
===================================================================
--- parse.y 2004-06-10 19:00:39.000000000 +0530
+++ parse.y 2004-06-11 16:30:27.000000000 +0530
@@ -7584,7 +7584,14 @@ void java_layout_seen_class_methods (voi
{
for (current = previous_list;
current != end; current = TREE_CHAIN (current))
- layout_class_methods (TREE_TYPE (TREE_VALUE (current)));
+ {
+ tree cls = TREE_TYPE (TREE_VALUE (current));
+
+ if (! CLASS_LOADED_P (cls))
+ load_class (cls, 1);
+
+ layout_class_methods (cls);
+ }
if (previous_list != all_class_list)
{
----------------------------- 8< -----------------------------
We were trying to lay out the methods of a class without
making sure that the class was indeed loaded. Either I am
missing something or it is extreme providence that we have
missed this all this while!
I'll do a clean bootstrap and libjava testsuite run to
make sure that this is fully correct.
(Nitpicking: "Layout" is a noun, while "lay out" is the verb
form - all methods using the former while intending the latter
are wrongly named. :-/ )
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/