source: trunk/gcc/libjava/testsuite/libjava.lang/N19990310_02.java

Last change on this file was 2, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 892 bytes
Line 
1/*--------------------------------------------------------------------------*/
2/* Name : N19990310_02 */
3/* : */
4/* Cause : Array value calculation in for,while,do while loop is not */
5/* : correct */
6/* : */
7/* Message : NG:[3]-->[2] */
8/*--------------------------------------------------------------------------*/
9
10public class N19990310_02 {
11 public static void main(String[] args) {
12 int y[] = {2};
13 for ( int i = 0; i < 1; i++ ) {
14 y[i] += 1;
15 if ( y[i] != 3 ) {
16 System.out.println("NG:[3]-->[" +y[i]+ "]");
17 }
18 else
19 System.out.println("OK");
20 }
21 }
22}
Note: See TracBrowser for help on using the repository browser.