Bug 111698

Summary: gcj fails to compile Interface within an interface
Product: Red Hat Enterprise Linux 3 Reporter: Dennis Gregorovic <dgregor>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: vnasardinov
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-07 11:45:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
example interface with subinterface
none
extends subinterface
none
extends interface and references subinterface none

Description Dennis Gregorovic 2003-12-08 22:19:19 UTC
Description of problem:
gcj fails to compile a class that extends a subinterface or a class
that references a subinterface.  Example code to be attached.

Version-Release number of selected component (if applicable):
05:18:10 dgregor@galileo example$ gcj --version
gcj (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-23)


How reproducible:
always

Steps to Reproduce:
1.  see attached code
2.
3.
  
Actual results:
successful compilation.  IBM and Sun JDKs compile this code successfully.

Expected results:
compilation errors

Additional info:

Comment 1 Dennis Gregorovic 2003-12-08 22:20:56 UTC
Created attachment 96410 [details]
example interface with subinterface

Comment 2 Dennis Gregorovic 2003-12-08 22:21:40 UTC
Created attachment 96411 [details]
extends subinterface

Comment 3 Dennis Gregorovic 2003-12-08 22:22:15 UTC
Created attachment 96412 [details]
extends interface and references subinterface

Comment 4 Dennis Gregorovic 2003-12-08 22:22:50 UTC
05:10:38 dgregor@galileo example$ gcj *.java
FooBar.java:1: Superinterface `Foo.Bar' of class `FooBar' not found.
   public final class FooBar implements Foo.Bar {
                                        ^
1 error
MyFoo.java:4: Superinterface `Foo' of class `MyFoo' not found.
   public class MyFoo implements Foo {
                                 ^
MyFoo.java:6: Type `Foo.Bar' not found in the declaration of the
argument `bar' of method `addBar'.
       public void addBar(Foo.Bar bar) {
                          ^
MyFoo.java:9: Type `Foo' not found in the declaration of the return
type of method `copy'.
       public Foo copy() {
              ^
MyFoo.java:10: Type `Foo' not found in the declaration of the local
variable `newFoo'.
           Foo newFoo = new MyFoo();
           ^
MyFoo.java:12: Type `Bar' not found in the declaration of the local
variable `bar'.
               Bar bar = (Bar) bars.next();
               ^
5 errors


Comment 5 Vadim Nasardinov 2003-12-08 22:40:23 UTC
Just wanted to mention that attachment 96410 [details] basically has the same 
structure as java.util.Map and java.util.Map.Entry, i.e.
Map.Entry is an inner interface of the Map interface.


Comment 6 Richard Li 2004-01-20 21:15:31 UTC
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8544

Comment 7 Jakub Jelinek 2004-10-07 11:45:15 UTC
This is already tracked upstream.