mirror of
https://github.com/golang/go
synced 2024-11-24 12:40:12 -07:00
afad74ec30
Post-liveness fix, the slices on both sides can now be indirects of & variables. The cgen code handles those cases just fine. Fixes #15988 Change-Id: I378ad1d5121587e6107a9879c167291a70bbb9e4 Reviewed-on: https://go-review.googlesource.com/23863 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
15 lines
252 B
Go
15 lines
252 B
Go
// compile
|
|
|
|
// Copyright 2016 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package p
|
|
|
|
func f(p, q []int) {
|
|
p = append(q, 5)
|
|
sink = &p
|
|
}
|
|
|
|
var sink *[]int
|