summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/err1.java
blob: 7530252c86fb1d57a42db18fbafc3a2d5093feb8 (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
/*-------------------------------------------------------------------------*/
/* File name : err1.java                                                   */
/*           :                                                             */
/* Cause     : When I make class-type Object.                              */
/*           :                                                             */
/* Message   : Internal compiler error: program jc1 got                    */
/*           :  fatal signal 11                                            */
/*-------------------------------------------------------------------------*/

class A {
  int counter = 100;
}

public class err1 {
  public static void main(String[] args) {
    A array[] = new A[10]; //err
    array[0] = new A();

    if ( array[0].counter == 100 ) {
      System.out.println("OK");
    } else {
      System.out.println("NG:[100]-->[" +array[0].counter+ "]");
    }
  }
}