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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 765 jeremybenn
/*--------------------------------------------------------------------------*/
2
/* File name  : err10.java                                                  */
3
/*            :                                                             */
4
/* Cause      : Operator >>> doesn't work correctly when value is negative. */
5
/*            :                                                             */
6
/* Message    : NG : a = -2                                                 */
7
/*--------------------------------------------------------------------------*/
8
 
9
public class err10 {
10
  public static void main(String[] args) {
11
    int a = -3;
12
 
13
    a = a>>>1;
14
 
15
    if ( a == 2147483646 ) {
16
      System.out.println("OK");
17
    } else {
18
      System.out.println("NG:[2147483646]-->[" +a+ "]");
19
    }
20
 
21
  }
22
}
23
 

powered by: WebSVN 2.1.0

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