diff --git a/cl/_testrt/nextblock/in.go b/cl/_testrt/nextblock/in.go new file mode 100644 index 00000000..667ac314 --- /dev/null +++ b/cl/_testrt/nextblock/in.go @@ -0,0 +1,10 @@ +package main + +func main() { + syms := []int{} + for range syms { + } + defer println("bye") + for range syms { + } +} diff --git a/cl/_testrt/nextblock/out.ll b/cl/_testrt/nextblock/out.ll new file mode 100644 index 00000000..1c8a0e79 --- /dev/null +++ b/cl/_testrt/nextblock/out.ll @@ -0,0 +1 @@ +; \ No newline at end of file diff --git a/ssa/eh.go b/ssa/eh.go index 7b097005..902aabac 100644 --- a/ssa/eh.go +++ b/ssa/eh.go @@ -86,6 +86,7 @@ const ( func (p Function) deferInitBuilder() (b Builder, next BasicBlock) { b = p.NewBuilder() next = b.setBlockMoveLast(p.blks[0]) + p.blks[0].last = next.last return }