Files
clang-p2996/llgo/third_party/gotools/go/pointer/testdata/issue9002.go
Peter Collingbourne 56109b78c7 Roll gotools to 47f2109c.
At the same time, perform a number of simplifications:

- Rename go.tools directory to gotools.

- Import only the go directory; all required Go analysis code and
  its dependencies have now been moved to this directory.

llvm-svn: 225825
2015-01-13 20:45:08 +00:00

18 lines
482 B
Go

package main
func main() {
// Regression test for golang issue 9002.
//
// The two-result "value,ok" receive operation generated a
// too-wide constraint loading (value int, ok bool), not bool,
// from the channel.
//
// This bug manifested itself in an out-of-bounds array access
// when the makechan object was the highest-numbered node, as in
// this program.
//
// In more realistic programs it silently resulted in bogus
// constraints.
_, _ = <-make(chan int)
}