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-1.go] - Blame information for rev 801

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) int {
4
  if s[0] != 'a' || s[1] != 'b' || s[2] != 'c' {
5
    panic(0);
6
  }
7
  return len(s);
8
}
9
 
10
func main() {
11
  s := "abc";
12
  if fn(s) != 3 {
13
    panic(1);
14
  }
15
}

powered by: WebSVN 2.1.0

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