Bug 9943

Summary: field reference of enclosing class in an inner class cannot be compiled.
Product: gcc Reporter: julias
Component: javaAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, java-prs, tromey
Priority: P3 Keywords: rejects-valid
Version: unknown   
Target Milestone: 4.3.0   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2005-07-23 05:28:41
Bug Depends on: 4695, 28067    
Bug Blocks: 13607    
Attachments: testcase.java

Description julias 2003-03-04 19:06:00 UTC
The compiler incorectly identifies "m_opts" as a super class field. It is a field of the embeddeding class, but not a member of the class or the super class being defined.

gcj -c testcase.java
testcase.java: In class `testcase$option':
testcase.java: In constructor `(testcase)':
testcase.java:22: Can't reference `m_opts' before the superclass constructor has been called.
         super(m_opts);
               ^
1 error

Release:
unknown

Environment:
linux

How-To-Repeat:
invoke: gcj -c testcase.java
Comment 1 Tom Tromey 2003-05-03 01:45:41 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Still a bug
Comment 2 Andrew Pinski 2003-07-11 21:07:59 UTC
Still happens on the mainline (20030711).
Comment 3 Andrew Pinski 2003-08-10 03:55:04 UTC
Most likely related to bug 4695.
Comment 4 Tom Tromey 2007-01-09 20:45:24 UTC
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.
Thanks.