2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
authorapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Sep 2001 04:54:05 +0000 (04:54 +0000)
committerapbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Sep 2001 04:54:05 +0000 (04:54 +0000)
* libjava.compile/final_assignment_check.java: New file.
* libjava.compile/final_assignment_check.xfail: Likewise.
* libjava.compile/final_local_switch.java: Likewise.

(http://gcc.gnu.org/ml/java-patches/2001-q3/msg00342.html )

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45346 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/testsuite/ChangeLog
libjava/testsuite/libjava.compile/final_assignment_check.java [new file with mode: 0644]
libjava/testsuite/libjava.compile/final_assignment_check.xfail [new file with mode: 0644]
libjava/testsuite/libjava.compile/final_local_switch.java [new file with mode: 0644]

index 2c95ebc..7ebb126 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
+
+       * libjava.compile/final_assignment_check.java: New file.
+       * libjava.compile/final_assignment_check.xfail: Likewise.
+       * libjava.compile/final_local_switch.java: Likewise.
+       
 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
 
        * libjava.lang/KeepInline.out: Fixed content.
diff --git a/libjava/testsuite/libjava.compile/final_assignment_check.java b/libjava/testsuite/libjava.compile/final_assignment_check.java
new file mode 100644 (file)
index 0000000..418fd91
--- /dev/null
@@ -0,0 +1,12 @@
+class f {
+    final static char c = 3;
+    final static byte b = 0.1;
+    final static short s = 3.5f;
+    final static int i = 4L;
+    final static long x = 2.5;
+    final static float y = 2.6;
+    final static String S = new Object (); 
+    void foo () {
+      final int i = 2.1;
+    }
+}
diff --git a/libjava/testsuite/libjava.compile/final_assignment_check.xfail b/libjava/testsuite/libjava.compile/final_assignment_check.xfail
new file mode 100644 (file)
index 0000000..e3b083b
--- /dev/null
@@ -0,0 +1 @@
+shouldfail
diff --git a/libjava/testsuite/libjava.compile/final_local_switch.java b/libjava/testsuite/libjava.compile/final_local_switch.java
new file mode 100644 (file)
index 0000000..c4a4de6
--- /dev/null
@@ -0,0 +1,16 @@
+// This bug was discovered while working on java/1413 (compiling freetds.)
+// http://gcc.gnu.org/ml/java-prs/2000-q4/msg00156.html
+// The following code should build.
+
+class final_local_switch {
+    void foo (int type) {
+       final byte CHARSET_CHANGE = (byte)3;
+       final byte CHARSET_CHANGES = (byte)4;
+       switch (type) {
+       case CHARSET_CHANGE:
+           break;
+       case CHARSET_CHANGES:
+           break;
+       }
+    }
+}