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: 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




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