diff --git a/src/cmd/compile/internal/ssa/expand_calls.go b/src/cmd/compile/internal/ssa/expand_calls.go index f589db419903c..fb281f2f8452c 100644 --- a/src/cmd/compile/internal/ssa/expand_calls.go +++ b/src/cmd/compile/internal/ssa/expand_calls.go @@ -286,7 +286,7 @@ func (x *expandState) rewriteCallArgs(v *Value, firstArg int) { if v.Op == OpTailLECall { // For tail call, we unwind the frame before the call so we'll use the caller's // SP. - sp = x.f.Entry.NewValue1(src.NoXPos, OpGetCallerSP, x.typs.Uintptr, mem) + sp = v.Block.NewValue1(src.NoXPos, OpGetCallerSP, x.typs.Uintptr, mem) } for i, a := range argsWithoutMem { // skip leading non-parameter SSA Args and trailing mem SSA Arg. diff --git a/test/fixedbugs/issue69825.go b/test/fixedbugs/issue69825.go new file mode 100644 index 0000000000000..d3d3ec5e6ac84 --- /dev/null +++ b/test/fixedbugs/issue69825.go @@ -0,0 +1,18 @@ +// compile -d=libfuzzer + +// Copyright 2024 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 T struct { + A +} + +type A struct { +} + +//go:noinline +func (a *A) Foo(s [2]string) { +}