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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 765 jeremybenn
/*--------------------------------------------------------------------------*/
2
/* File name : err12.java                                              */
3
/*            :                                                             */
4
/* Cause      : Cast negative floating point to char makes error            */
5
/*            :                                                             */
6
/* Message    : Internal compiler error in functi on convert_move           */
7
/*--------------------------------------------------------------------------*/
8
 
9
public class err12 {
10
        public static void main(String[] args){
11
                char x1, x2;
12
 
13
                float y = -10000f;
14
 
15
                x1 = (char)y;           // err
16
                x2 = (char)-10000f;     // ok
17
 
18
                if ( x1 == x2 ) {
19
                        System.out.println("OK");
20
                } else {
21
                        System.out.println("NG");
22
                        System.out.println("x1:[65520]-->[" +(x1-0)+"]");
23
                        System.out.println("x2:[65520]-->[" +(x2-0)+"]");
24
                }
25
        }
26
}
27
 

powered by: WebSVN 2.1.0

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