summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/err8.java
blob: 220b2ac4fad29ec32ed23265358d26e4d3d0659d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*--------------------------------------------------------------------------*/
/* File name  : err8.java                                              */
/*            :                                                             */
/* Cause      : When "do while" statement has only "break", error.          */
/*            :                                                             */
/* Message    : err8.java: In class `err8': xxxxxx                */
/*            : err8.java: In method `main(java.lang.String[])':       */
/*            : err8.java:20: Unreachable statement.                   */
/*            :                 } while (true) ;                            */
/*            :                         ^                                   */
/*            : 1 error                                                     */
/*--------------------------------------------------------------------------*/

public class err8 {
  public static void main(String[] args) {
    do {
      break;
    } while (true) ;

    System.out.println("OK");
  }
}