mirror of
https://github.com/golang/go
synced 2024-11-11 18:51:37 -07:00
e8666abd98
If the address of an auto is used in a Call, we need to keep it, as we keep the Call itself. Fixes #45693. Change-Id: Ie548d6dffc95bf916868a8885d4ab4cf9e86355a Reviewed-on: https://go-review.googlesource.com/c/go/+/312670 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
17 lines
291 B
Go
17 lines
291 B
Go
// compile
|
|
|
|
// Copyright 2021 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.
|
|
|
|
// Issue 45693: ICE with register args.
|
|
|
|
package p
|
|
|
|
func f() {
|
|
var s string
|
|
s = s + "" + s + "" + s + ""
|
|
for {
|
|
}
|
|
}
|