This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: new test case
- From: Anthony Green <green at redhat dot com>
- To: java-patches at gcc dot gnu dot org
- Date: 29 Sep 2002 14:59:50 -0700
- Subject: Patch: new test case
This patch adds a test case for a compiler bug I'm about to submit a
patch for.
Ok?
AG
2002-09-29 Anthony Green <green@redhat.com>
* libjava.lang/utf8concat.java: New file.
* libjava.lang/utf8concat.out: Ditto.
Index: testsuite/libjava.lang/utf8concat.java
===================================================================
RCS file: testsuite/libjava.lang/utf8concat.java
diff -N testsuite/libjava.lang/utf8concat.java
*** /dev/null 1 Jan 1970 00:00:00 -0000
--- testsuite/libjava.lang/utf8concat.java 29 Sep 2002 21:55:30 -0000
***************
*** 0 ****
--- 1,11 ----
+ public class utf8concat
+ {
+ private static String s;
+
+ public static void main (String[] args)
+ {
+ // This causes a crash at runtime because the compiler is
+ // producing an invalid UTF-8 string literal.
+ s = "abc" + (char)183;
+ }
+ }
Index: testsuite/libjava.lang/utf8concat.out
===================================================================
RCS file: testsuite/libjava.lang/utf8concat.out
diff -N testsuite/libjava.lang/utf8concat.out