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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 698 jeremybenn
package main
2
 
3
func fn(a []int) int {
4
  alen := len(a);
5
  for i := 0; i < alen; i++ {
6
    a[i] = i
7
  }
8
  return alen;
9
}
10
 
11
func main() {
12
  var a [2]int;
13
  if fn(a[0:]) != 2 {
14
    panic(0);
15
  }
16
  if a[0] != 0 || a[1] != 1 {
17
    panic(1);
18
  }
19
}

powered by: WebSVN 2.1.0

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