This is the mail archive of the
java-prs@sources.redhat.com
mailing list for the Java project.
Re: gcj/242
- To: apbianco at cygnus dot com
- Subject: Re: gcj/242
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: 20 Jul 2000 18:30:00 -0000
- Cc: java-prs at sourceware dot cygnus dot com,
- Reply-To: Alexandre Petit-Bianco <apbianco at cygnus dot com>
The following reply was made to PR gcj/242; it has been noted by GNATS.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: java-gnats@sourceware.cygnus.com
Cc:
Subject: Re: gcj/242
Date: Thu, 20 Jul 2000 11:27:25 -0700 (PDT)
Bryce McKinlay writes:
> I've just done another bulk patch test, installing and testing the
> patches for the following PRs:
Thanks!
> [bryce@hokkaido PR225]$ gcj -C ProtectedInnerInterface.java
> foo/ProtectedInnerInterface_OtherPkgTest3.java
> foo/ProtectedInnerInterface_OtherPkgTest3.java:8: Superinterface
> `ProtectedInnerInterface.Inter' of class
> `foo.ProtectedInnerInterface_OtherPkgTest3' not found.
> ProtectedInnerInterface.Inter {}
> ^
> gcj: Internal error: Segmentation fault (program jc1)
Yes. Tom privately reported to me a similar problem. I think I have a
patch, though it hasn't been thoroughly tested (yet.)
./A
2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (find_as_inner_class): Handle the case where the
enclosing context of an innerclass has been loaded as bytecode.
Index: parse.y
===================================================================
diff -u -p parse.y
--- old-/home/apbianco/src/egcs/gcc/.java-ref/parse.y Wed Jul 19 12:40:25 2000
+++ parse.y Wed Jul 19 15:21:44 2000
@@ -3492,7 +3492,18 @@ find_as_inner_class (enclosing, name, cl
else
qual = build_tree_list (build_expr_wfl (name, NULL, 0, 0), NULL_TREE);
- return find_as_inner_class_do (qual, enclosing);
+ if (!(to_return = find_as_inner_class_do (qual, enclosing)))
+ {
+ /* It might be the case that the enclosing class was loaded as
+ bytecode, in which case it will be missing the
+ DECL_INNER_CLASS_LIST. We build a fully qualified internal
+ innerclass name and we try to load it. */
+ tree fqin = identifier_subst (name, "", '.', '$', "");
+ tree ptr;
+ BUILD_PTR_FROM_NAME (ptr, fqin);
+ to_return = resolve_class (NULL_TREE, ptr, NULL_TREE, cl);
+ }
+ return to_return;
}
/* We go inside the list of sub classes and try to find a way