summaryrefslogtreecommitdiff
path: root/gcc/testsuite/go.go-torture/execute/go-2.go
blob: 8ce5fc8791cef2ecb762a5c7bb7eb66761ae9ca4 (plain)
1
2
3
4
5
6
7
8
9
10
11
package main

func send_one(c chan <- int, val int) {
  c <- val;
}

func main() {
  c := make(chan int);
  go send_one(c, 0);
  if <-c != 0 { panic(0) }
}