OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [PR3096.java] - Blame information for rev 765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
// This test case was built for java/3096.
2
 
3
class PR3096
4
{
5
  static void foo (int x[], int i) {
6
    ++x[i];
7
  }
8
  static void foo (float x[], int i) {
9
    ++x[i];
10
  }
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]);
35
  }
36
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.