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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

/*--------------------------------------------------------------------------*/
/* File name  : err10.java                                                  */
/*            :                                                             */
/* Cause      : Operator >>> doesn't work correctly when value is negative. */
/*            :                                                             */
/* Message    : NG : a = -2                                                 */
/*--------------------------------------------------------------------------*/
 
public class err10 {
  public static void main(String[] args) {
    int a = -3;
 
    a = a>>>1;
 
    if ( a == 2147483646 ) {
      System.out.println("OK"); 
    } else {
      System.out.println("NG:[2147483646]-->[" +a+ "]"); 
    }
 
  }
}
 
 

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.