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

Subversion Repositories openrisc

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

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(s string) string {
4
  if len(s) != 3 {
5
    panic(0)
6
  }
7
  i := len(s) - 1;
8
  return s + s[0 : i];
9
}
10
 
11
func main() {
12
  s := fn("abc");
13
  if s != "abcab" {
14
    panic(1)
15
  }
16
}

powered by: WebSVN 2.1.0

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