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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [err4.java] - Rev 781

Go to most recent revision | Compare with Previous | Blame | View Log

/*--------------------------------------------------------------------------*/
/* file_name  : err4.java                                              */
/*            :                                                             */
/* Cause      : Evaluation of the array which used the substitution         */
/*            : operator is not performed correctly.                        */
/*            :                                                             */
/* Message    : NG1:[27}-->[9.0]                                            */
/*            : NG1:[27}-->[9.0]                                            */
/*--------------------------------------------------------------------------*/
 
public class err4 {
  public static void main(String[] args) {
 
    // TEST1
    float []a = {9f};
    a[0] *= (a[0] = 3f);
 
    if ( a[0] == 27 ) {
      System.out.println("OK1");
    } else {
      System.out.println("NG1:[27}-->["+a[0]+"]");
    }
 
    //TEST2
    float [] b = {9f};
    b[0] = (float)(b[0] * (b[0] = 3f));
    if ( b[0] == 27 ) {
      System.out.println("OK1");
    } else {
      System.out.println("NG1:[27}-->["+b[0]+"]");
    }
  }
}
 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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