This is the mail archive of the
java-prs@sources.redhat.com
mailing list for the Java project.
gcj/383: duplicate switch label problems
- To: java-gnats at sourceware dot cygnus dot com
- Subject: gcj/383: duplicate switch label problems
- From: mdejong at cygnus dot com
- Date: 11 Dec 2000 23:50:28 -0000
- Reply-To: mdejong at cygnus dot com
>Number: 383
>Category: gcj
>Synopsis: duplicate switch label problems
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 11 16:00:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: mdejong@cygnus.com
>Release: unknown-1.0
>Organization:
>Environment:
Linux, Red Hat 6.2
>Description:
The following class compiles, but it should fail
because of a duplicate switch block.
class T1410d1 {
void foo(int i) {
switch (i) {
case 0:
case 0:
}
}
}
One can even get the compiler to core
dump by adding another a case label:
class T1410d1 {
void foo(int i) {
switch (i) {
case 0:
case 1:
case 0:
}
}
}
>How-To-Repeat:
Compile with "gcj -C T1410d1.java".
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: