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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
/*--------------------------------------------------------------------------*/
2
/* file_name  : err4.java                                              */
3
/*            :                                                             */
4
/* Cause      : Evaluation of the array which used the substitution         */
5
/*            : operator is not performed correctly.                        */
6
/*            :                                                             */
7
/* Message    : NG1:[27}-->[9.0]                                            */
8
/*            : NG1:[27}-->[9.0]                                            */
9
/*--------------------------------------------------------------------------*/
10
 
11
public class err4 {
12
  public static void main(String[] args) {
13
 
14
    // TEST1
15
    float []a = {9f};
16
    a[0] *= (a[0] = 3f);
17
 
18
    if ( a[0] == 27 ) {
19
      System.out.println("OK1");
20
    } else {
21
      System.out.println("NG1:[27}-->["+a[0]+"]");
22
    }
23
 
24
    //TEST2
25
    float [] b = {9f};
26
    b[0] = (float)(b[0] * (b[0] = 3f));
27
    if ( b[0] == 27 ) {
28
      System.out.println("OK1");
29
    } else {
30
      System.out.println("NG1:[27}-->["+b[0]+"]");
31
    }
32
  }
33
}
34
 

powered by: WebSVN 2.1.0

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