gcj/383: duplicate switch label problems

Tom Tromey tromey@redhat.com
Mon Dec 11 16:40:00 GMT 2000


The following reply was made to PR gcj/383; it has been noted by GNATS.

From: Tom Tromey <tromey@redhat.com>
To: mdejong@cygnus.com
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/383: duplicate switch label problems
Date: 11 Dec 2000 17:49:41 -0700

 Mo> The following class compiles, but it should fail
 Mo> because of a duplicate switch block.
 
 I'm using a relatively recent gcj.  I don't have any of my local
 patches in the current build.
 
 I tried your test program:
 
 creche. gcj --syntax-only T1410d1.java 
 T1410d1.java: In class `T1410d1':
 T1410d1.java: In method `foo(int)':
 T1410d1.java:6: Duplicate case label: `0'.
                case 0:
                ^
 1 error
 
 
 If I run gcj as `gcj -C' then it erroneously passes.
 
 
 
 Mo> One can even get the compiler to core
 Mo> dump by adding another a case label:
 
 Without -C this works, but with -C I get the segv.
 
 In both cases using `-c' instead of `-C' does the right thing.
 
 So it appears to be a bug in the bytecode generator and not in the
 front end.
 
 Thanks,
 Tom


More information about the Java-prs mailing list