Bug 27399 - GCJ permits indexing by final object
Summary: GCJ permits indexing by final object
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 28067
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-02 19:31 UTC by cagney
Modified: 2007-01-09 20:48 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-05-29 22:12:25


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cagney 2006-05-02 19:31:46 UTC
This compiles:

public class ClassIndex
    implements Comparable
{
    static final ClassIndex x = new ClassIndex ();
    public int compareTo (Object o)
    {
        return 0;
    }
    public static void main (String[] args)
    {
        System.out.println (ClassIndex.x);
        byte[] b = new byte[ClassIndex.x];
        System.out.println ("Array length: " + b.length);
    }
}

$ gcj -C ClassIndex.java
$ gcj --version
gcj (GCC) 4.1.0 20060304 (Red Hat 4.1.0-3)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Comment 1 Andrew Pinski 2006-05-29 22:12:25 UTC
Confirmed.
Comment 2 Tom Tromey 2007-01-09 20:48:33 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.