summaryrefslogtreecommitdiffstats
path: root/llgo/test/irgen/select.go
blob: 748277a4f49a98da0911e188d9fa7b4d5bf6d325 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// RUN: llgo -S -emit-llvm -o - %s | FileCheck %s

package foo

// CHECK-NOT: alloca [1024 x i8]
// CHECK-NOT: alloca [2048 x i8]
// CHECK: alloca [4096 x i8]
func F() {
	ch1 := make(chan [1024]byte)
	ch2 := make(chan [2048]byte)
	ch3 := make(chan [4096]byte)
	select {
	case <-ch1:
	case _ = <-ch2:
	case x := <-ch3:
		_ = x[0]
	}
}
OpenPOWER on IntegriCloud