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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [go.go-torture/] [execute/] [for-2.go] - Blame information for rev 718

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 698 jeremybenn
package main
2
 
3
func f1() {
4
  j := 0;
5
  for i := 0; i < 10; i++ {
6
    if i > 2 {
7
      break;
8
    }
9
    j = i;
10
  }
11
  if (j != 2) {
12
    panic(0);
13
  }
14
}
15
 
16
func f2() {
17
  for i := 0; i < 10; i++ {
18
    if i >= 0 {
19
      continue;
20
    }
21
    panic(1);
22
  }
23
}
24
 
25
func f3() {
26
  lab1:
27
  for i := 0; i < 10; i++ {
28
    for j := 0; j < 10; j++ {
29
      if j > 2 {
30
        break lab1;
31
      }
32
    }
33
    panic(2);
34
  }
35
}
36
 
37
func f4() {
38
  lab1:
39
  for i := 0; i < 10; i++ {
40
    for j := 0; j < 10; j++ {
41
      continue lab1;
42
    }
43
    panic(3);
44
  }
45
}
46
 
47
func main() {
48
  f1();
49
  f2();
50
  f3();
51
  f4()
52
}

powered by: WebSVN 2.1.0

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