This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[PATCH]: New test case.
- To: java-patches at gcc dot gnu dot org
- Subject: [PATCH]: New test case.
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Thu, 25 Oct 2001 14:11:22 -0700
- Reply-to: apbianco at cygnus dot com
I'm checking this new test case. PR3096 will be fixed as soon as Thang
completes the copyright assignment.
./A
2001-10-04 Alexandre Petit-Bianco <apbianco@redhat.com>
* libjava.lang/PR3096.java: New file.
* libjava.lang/PR3096.out: Likewise.
Index: libjava.lang/PR3096.java
===================================================================
RCS file: PR3096.java
diff -N PR3096.java
--- /dev/null Tue May 5 13:32:27 1998
+++ PR3096.java Thu Oct 25 14:09:47 2001
@@ -0,0 +1,36 @@
+// This test case was built for java/3096.
+
+class PR3096
+{
+ static void foo (int x[], int i) {
+ ++x[i];
+ }
+ static void foo (float x[], int i) {
+ ++x[i];
+ }
+ public static void main(String [] args) {
+ int a[] = new int [1];
+ float f[] = new float [1];
+ int b[];
+ int i = 0;
+ foo (a,0);
+ foo (f,0);
+ System.out.println (a[0]);
+ System.out.println (f[0]);
+ System.out.println ((b=a)[0]);
+ (b=a)[i]=99;
+ b[0]++;
+ System.out.println (a[0]+", "+b[0]);
+ System.out.println (++a[i]);
+ System.out.println (a[i]);
+ System.out.println (a[i]++);
+ System.out.println (a[i]);
+ String s[] = new String [1];
+ String y[];
+ s[0]="";
+ s[0] += "Peace ";
+ System.out.println (s[0]);
+ (y=s)[0] += "now!";
+ System.out.println (s[0]+", "+y[0]);
+ }
+}
Index: libjava.lang/PR3096.out
===================================================================
RCS file: PR3096.out
diff -N PR3096.out
--- /dev/null Tue May 5 13:32:27 1998
+++ PR3096.out Thu Oct 25 14:09:47 2001
@@ -0,0 +1,10 @@
+1
+1.0
+1
+100, 100
+101
+101
+101
+102
+Peace
+Peace now!, Peace now!