Bug 27400

Summary: switch indexed by class crashes compiler
Product: gcc Reporter: cagney
Component: javaAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, java-prs
Priority: P3    
Version: 4.1.0   
Target Milestone: 4.3.0   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2006-05-29 22:12:44
Bug Depends on: 28067    
Bug Blocks:    

Description cagney 2006-05-02 19:36:34 UTC
$ cat EnumClass.java
class EnumClass
{
    static public final EnumClass x = new EnumClass ();
}
$ cat ClassSwitch.java
class ClassSwitch
{
    public static void main (String[] args)
    {
        switch (args.length) {
        case EnumClass.x: return;
        }
        System.out.println ("Switched");
    }
}
$ gcj ClassSwitch.java
ClassSwitch.java:5: internal compiler error: Segmentation fault
$ 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:44 UTC
Confirmed.
Comment 2 Tom Tromey 2007-01-09 20:48:35 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.