summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/err12.java
blob: 9631b3de6af6345d26681427c3d6754baf3ae48e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*--------------------------------------------------------------------------*/
/* File name : err12.java                                              */
/*            :                                                             */
/* Cause      : Cast negative floating point to char makes error            */
/*            :                                                             */
/* Message    : Internal compiler error in functi on convert_move           */
/*--------------------------------------------------------------------------*/

public class err12 {
	public static void main(String[] args){
		char x1, x2;

		float y = -10000f;

		x1 = (char)y;		// err
		x2 = (char)-10000f;	// ok

		if ( x1 == x2 ) {
			System.out.println("OK");
		} else {
			System.out.println("NG");
			System.out.println("x1:[65520]-->[" +(x1-0)+"]");
			System.out.println("x2:[65520]-->[" +(x2-0)+"]");
		}
	}
}