blob: 748277a4f49a98da0911e188d9fa7b4d5bf6d325 [file] [log] [blame]
Andrew Wilkins75f34af2014-12-31 03:46:49 +00001// RUN: llgo -S -emit-llvm -o - %s | FileCheck %s
2
3package foo
4
5// CHECK-NOT: alloca [1024 x i8]
6// CHECK-NOT: alloca [2048 x i8]
7// CHECK: alloca [4096 x i8]
8func F() {
9 ch1 := make(chan [1024]byte)
10 ch2 := make(chan [2048]byte)
11 ch3 := make(chan [4096]byte)
12 select {
13 case <-ch1:
14 case _ = <-ch2:
15 case x := <-ch3:
16 _ = x[0]
17 }
18}