diff --git a/go/ssa/builder.go b/go/ssa/builder.go index 3f760d24b25..54f2ef9f512 100644 --- a/go/ssa/builder.go +++ b/go/ssa/builder.go @@ -1054,6 +1054,7 @@ func (b *builder) assignStmt(fn *Function, lhss, rhss []ast.Expr, isDef bool) { } else { // e.g. x, y = pos() tuple := b.exprN(fn, rhss[0]) + emitDebugRef(fn, rhss[0], tuple, false) for i, lval := range lvals { lval.store(fn, emitExtract(fn, tuple, i)) } diff --git a/go/ssa/testdata/valueforexpr.go b/go/ssa/testdata/valueforexpr.go index 028c1531330..4a2cb85a384 100644 --- a/go/ssa/testdata/valueforexpr.go +++ b/go/ssa/testdata/valueforexpr.go @@ -12,7 +12,11 @@ func f(spilled, unspilled int) { _ = /*@Parameter*/ (unspilled) _ = /*@*/ (1 + 2) // (constant) i := 0 + + f := func() (int, int) { return 0, 0 } + /*@Call*/ (print( /*@BinOp*/ (i + 1))) + _, _ = /*@Call*/ (f()) ch := /*@MakeChan*/ (make(chan int)) /*@UnOp*/ (<-ch) x := /*@UnOp*/ (<-ch)