summaryrefslogtreecommitdiffstats
path: root/llgo/third_party/gotools/go/pointer/testdata/issue9002.go
blob: b7c2c610903fcf5164050fdcfe1e5fb72a1acf08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)
}
OpenPOWER on IntegriCloud