From ad9841e8ac74bfcb1814b728a143408e87dd00a7 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 27 Nov 2014 00:06:42 +0000 Subject: Initial commit of llgo. llvm-svn: 222857 --- llgo/test/execution/arrays/slice.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 llgo/test/execution/arrays/slice.go (limited to 'llgo/test/execution/arrays/slice.go') diff --git a/llgo/test/execution/arrays/slice.go b/llgo/test/execution/arrays/slice.go new file mode 100644 index 00000000000..e2880906d92 --- /dev/null +++ b/llgo/test/execution/arrays/slice.go @@ -0,0 +1,14 @@ +// RUN: llgo -o %t %s +// RUN: %t 2>&1 | FileCheck %s + +// CHECK: 10 +// CHECK-NEXT: 9 + +package main + +func main() { + var a [10]int + b := a[1:] + println(len(a)) + println(len(b)) +} -- cgit v1.2.3