* c-c++-common/ubsan/float-cast-overflow-6.c: Add i?86-*-* target.
[official-gcc.git] / libjava / testsuite / libjava.lang / err2.java
blobdeeddf633e94491fa4ed6e34bddc18dee1cbe9e4
1 /*--------------------------------------------------------------------------*/
2 /* File name : err2.java */
3 /* : */
4 /* Cause : Operator "+=" error in char,byte,short type */
5 /* : */
6 /* Message : err2.java: In class `err2': */
7 /* : err2.java: In method `main(java.lang.String[])': */
8 /* : err2.java:22: Incompatible type for `='. Explicit cast */
9 /* : needed to convert `int' to `byte'. */
10 /* : a %= b; */
11 /* : ^ */
12 /* : 1 error */
13 /*--------------------------------------------------------------------------*/
15 public class err2 {
16 public static void main(String[] args) {
17 byte a = -16;
18 byte b = 10;
20 a %= b;
22 if ( a == -6 ) {
23 System.out.println("OK");
24 } else {
25 System.out.println("a = " +a);