This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: new test case
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 26 Aug 2002 16:09:32 -0600
- Subject: Patch: FYI: new test case
- Reply-to: tromey at redhat dot com
I'm checking this in.
This test shows a bug in gcj's processing of `switch'. It incorrectly
decides that narrowing primitive conversion is not applicable.
I have a gcj front end patch which I'm testing. I'll check that in
once the testing is done.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* libjava.compile/narrow_case.java: New file.
Index: libjava.compile/narrow_case.java
===================================================================
RCS file: libjava.compile/narrow_case.java
diff -N libjava.compile/narrow_case.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ libjava.compile/narrow_case.java 26 Aug 2002 22:10:40 -0000
@@ -0,0 +1,11 @@
+public class narrow_case
+{
+ private int test(byte b)
+ {
+ switch (b)
+ {
+ case '0' :return 0;
+ }
+ return 99;
+ }
+}