libiberty: Fix comment typos
[official-gcc.git] / gcc / testsuite / go.test / test / fixedbugs / issue8039.go
blobee00c60d3e56fe2731b50c89f074b1edd65a2c64
1 // run
3 // Copyright 2014 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // issue 8039. defer copy(x, <-c) did not rewrite <-c properly.
9 package main
11 func f(s []int) {
12 c := make(chan []int, 1)
13 c <- []int{1}
14 defer copy(s, <-c)
17 func main() {
18 x := make([]int, 1)
19 f(x)
20 if x[0] != 1 {
21 println("BUG", x[0])