1// run
2
3// Copyright 2009 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7package main
8
9var g byte = 123
10var f *byte = &g
11var b = make([]byte, 5)
12
13func main() {
14	b[0:1][0] = *f
15	if b[0] != 123 {
16		println("want 123 got", b[0])
17		panic("fail")
18	}
19}
20