3 // Copyright 2019 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.
7 // Test escape analysis for self assignments.
18 func f(p *S) { // ERROR "leaking param: p"
23 // BAD: "leaking param: p" is too conservative
24 func g(p *S) { // ERROR "leaking param: p"
29 var s S // ERROR "moved to heap: s"