FSF GCC merge 02/23/03
[official-gcc.git] / libjava / testsuite / libjava.lang / PR3096.java
blobd5407ff1e7b244ff38b59a656ff4fff1fcfa92bf
1 // This test case was built for java/3096.
3 class PR3096
5 static void foo (int x[], int i) {
6 ++x[i];
8 static void foo (float x[], int i) {
9 ++x[i];
11 public static void main(String [] args) {
12 int a[] = new int [1];
13 float f[] = new float [1];
14 int b[];
15 int i = 0;
16 foo (a,0);
17 foo (f,0);
18 System.out.println (a[0]);
19 System.out.println (f[0]);
20 System.out.println ((b=a)[0]);
21 (b=a)[i]=99;
22 b[0]++;
23 System.out.println (a[0]+", "+b[0]);
24 System.out.println (++a[i]);
25 System.out.println (a[i]);
26 System.out.println (a[i]++);
27 System.out.println (a[i]);
28 String s[] = new String [1];
29 String y[];
30 s[0]="";
31 s[0] += "Peace ";
32 System.out.println (s[0]);
33 (y=s)[0] += "now!";
34 System.out.println (s[0]+", "+y[0]);