OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [pr109.java] - Blame information for rev 765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 765 jeremybenn
// PR 109
2
 
3
// Running the test code produces the output "0" instead of the
4
// expected "01234".
5
 
6
// The break statement exits both for-loops (not just the innermost
7
// one) if the (single statement) body of the outer for-loop is not
8
// enclosed in braces. Affects more deeply nested loops in the same
9
// way.
10
 
11
public class pr109
12
{
13
  public static void main (String argv[])
14
    {
15
      int i, j;
16
 
17
      for (i = 0; i < 5; i++)
18
        for (j = 0; j < 2; j++)
19
          {
20
            if (j == 1)
21
              break;
22
            System.out.print (i);
23
          }
24
 
25
      // We print a newline here because otherwise the DejaGNU log
26
      // file is screwed up.
27
      System.out.println ();
28
    }
29
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.