Bug 2630

Summary: GCJ permits indexing by final object
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Andrew Cagney <cagney>
Status: RESOLVED FIXED    
Severity: normal CC: mark
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 1839    

Description Andrew Cagney 2006-05-02 14:11:24 UTC
boink!

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);
    }
}
Comment 1 Andrew Cagney 2006-05-02 19:32:29 UTC
Index: frysk-imports/tests/ChangeLog
2006-05-02  Andrew Cagney  <cagney@redhat.com>

        * Makefile.am (frysk2630/noerror.sh, frysk2631/ice.sh): Add rules.
        * frysk2630/ClassIndex.java: New.
        * frysk2631/EnumClass.java: New.
        * frysk2631/ClassSwitch.java: New.
Comment 2 Andrew Cagney 2006-05-02 19:32:59 UTC
Pushed upstream:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27399
Comment 3 Mark Wielaard 2007-03-08 19:32:42 UTC
Fixed upstream, but waiting for:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231020