With certain invalid code, the 4.1 branch of gcj produces an ICE after giving
the correct error message. For example:

$ cat T5.java 
final class T6 {
}
class T5 extends T6 {
}

$ gcj -C T5.java 
T5.java:3: error: Can't subclass final classes: T6.
class T5 extends T6 {
                    ^
T5.java:0: internal compiler error: tree check: expected tree that contains
‘decl minimal’ structure, have ‘identifier_node’  in
check_inner_circular_reference, at ./gcc/java/parse.y:5389
Please submit a full bug report,[...]


This problem happens with latest CVS and the 4.1-20050515 snapshot but not
4.0.1. It sounds similar to bug 4715, and it seems to have a similar workaround
to the one given there; adding

 if (TREE_CODE (su) == POINTER_TYPE)
   continue;

to check_inner_circular_reference() makes the problem go away.

-- 
           Summary: 4.1 ICE: tree check error in
                    check_inner_circular_reference
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wmahan at gmail dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23754

Reply via email to