diff --git a/chore/gentests/gentests.go b/chore/gentests/gentests.go index 2a8c2214..2eb83129 100644 --- a/chore/gentests/gentests.go +++ b/chore/gentests/gentests.go @@ -33,6 +33,7 @@ func main() { llgenDir(dir + "/cl/_testlibc") llgenDir(dir + "/cl/_testrt") + llgenDir(dir + "/cl/_testgo") llgenDir(dir+"/cl/_testpy", "") llgenDir(dir+"/cl/_testdata", "") } diff --git a/ssa/decl.go b/ssa/decl.go index a4b64db1..2ff49cde 100644 --- a/ssa/decl.go +++ b/ssa/decl.go @@ -287,7 +287,8 @@ func (p Function) HasBody() bool { func (p Function) MakeBody(nblk int) Builder { p.MakeBlocks(nblk) b := p.NewBuilder() - b.impl.SetInsertPointAtEnd(p.blks[0].last) + b.blk = p.blks[0] + b.impl.SetInsertPointAtEnd(b.blk.last) return b }