1 // errorcheck -0 -live -l
3 //go:build !goexperiment.cgocheck2
4 // +build !goexperiment.cgocheck2
6 // Copyright 2017 The Go Authors. All rights reserved.
7 // Use of this source code is governed by a BSD-style
8 // license that can be found in the LICENSE file.
10 // Issue 20250: liveness differed with concurrent compilation
11 // due to propagation of addrtaken to outer variables for
20 func f(a T) { // ERROR "live at entry to f: a$"
21 var e interface{} // ERROR "stack object e interface \{\}$"
22 func() { // ERROR "live at entry to f.func1: &e a$"
23 e = a.s // ERROR "live at call to convT: &e$" "stack object a T$"
25 // Before the fix, both a and e were live at the previous line.