This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: new test case


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;
+  }
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]