mirror of
https://github.com/golang/go
synced 2024-11-23 18:20:04 -07:00
d603c27c6b
They get rewritten to NEWs, and they must be marked as escaping so walk doesn't try to allocate them back onto the stack. Fixes #15733 Change-Id: I433033e737c3de51a9e83a5a273168dbc9110b74 Reviewed-on: https://go-review.googlesource.com/23223 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
24 lines
309 B
Go
24 lines
309 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 main
|
|
|
|
type S struct {
|
|
a [1 << 16]byte
|
|
}
|
|
|
|
func f1() {
|
|
p := &S{}
|
|
_ = p
|
|
}
|
|
|
|
type T [1 << 16]byte
|
|
|
|
func f2() {
|
|
p := &T{}
|
|
_ = p
|
|
}
|