User account creation filtered due to spam.

Bug 12459 - Invalid inner class field access confusion
Summary: Invalid inner class field access confusion
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 3.3.1
: P2 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: accepts-invalid
: 22496 (view as bug list)
Depends on: 28067
Blocks: 18131
  Show dependency treegraph
 
Reported: 2003-09-30 09:50 UTC by Ralph Loader
Modified: 2007-01-09 20:45 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-05-04 02:34:22


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Loader 2003-09-30 09:50:20 UTC
Unless I'm going completely mad, this is not valid code.

$ cat temp.java

class x
{
    int i;
}
 
class temp
{
 
    int foo()
    {
        return x.i;
    }
}

$ gcj -O2 -S temp.java

$ echo $?
0

I think gcj needs more people using it for real development - it's actually
fairly solid on code that compiles, it's just the typos that confuse it.
Comment 1 Andrew Pinski 2003-09-30 15:38:51 UTC
This is a dup of bug 1333 which is fixed on the mainline.

*** This bug has been marked as a duplicate of 1333 ***
Comment 2 Andrew Pinski 2003-09-30 19:54:38 UTC
Okay I looked at this again and this is not a dup.
The problem is that gcj is accepting x.i (and turns it into the offset of i in x and uses that offset on 
this).
Comment 3 Andrew Pinski 2004-07-15 06:49:45 UTC
Actually now on the mainline it does: ((struct x *)this)->i which is just plainly wrong.
Comment 4 Andrew Pinski 2004-07-22 21:55:57 UTC
*** Bug 16677 has been marked as a duplicate of this bug. ***
Comment 5 Kalle Olavi Niemitalo 2005-02-01 18:03:43 UTC
Shouldn't this block bug 18131?
Comment 6 Andrew Pinski 2005-02-01 18:05:54 UTC
(In reply to comment #5)
> Shouldn't this block bug 18131?
Yes I must have missed this bug when creating that meta-bug.
Comment 7 Andrew Pinski 2005-07-15 11:56:01 UTC
*** Bug 22496 has been marked as a duplicate of this bug. ***
Comment 8 Tom Tromey 2007-01-09 20:45:52 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.