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] - Rev 719
Go to most recent revision | Compare with Previous | Blame | View Log
package main
func fn(s string) string {
if len(s) != 3 {
panic(0)
}
i := len(s) - 1;
return s + s[0 : i];
}
func main() {
s := fn("abc");
if s != "abcab" {
panic(1)
}
}
Go to most recent revision | Compare with Previous | Blame | View Log