From 129261ae834fa27307f0ed0363b5f719147f2378 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Tue, 27 Oct 2015 10:15:02 -0700 Subject: [PATCH] [dev.ssa] cmd/compile: give GetClosurePtr pointer type If the closure pointer gets spilled, we need to spill it with pointer type to make stack copy and GC happy. Change-Id: Ic108748e6b9caecd45522141f02c9422567376e3 Reviewed-on: https://go-review.googlesource.com/16363 Run-TryBot: Keith Randall Reviewed-by: David Chase --- src/cmd/compile/internal/gc/ssa.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go index 96c9a5fc9c..d4001146b6 100644 --- a/src/cmd/compile/internal/gc/ssa.go +++ b/src/cmd/compile/internal/gc/ssa.go @@ -2335,7 +2335,7 @@ func (s *state) addr(n *Node, bounded bool) *ssa.Value { return s.newValue2(ssa.OpAddPtr, p.Type, p, s.constIntPtr(Types[TUINTPTR], n.Xoffset)) case OCLOSUREVAR: return s.newValue2(ssa.OpAddPtr, Ptrto(n.Type), - s.entryNewValue0(ssa.OpGetClosurePtr, Types[TUINTPTR]), + s.entryNewValue0(ssa.OpGetClosurePtr, Ptrto(Types[TUINT8])), s.constIntPtr(Types[TUINTPTR], n.Xoffset)) case OPARAM: p := n.Left -- 2.48.1