Commit d9f2cafb authored by Keith Randall's avatar Keith Randall

[dev.ssa] cmd/compile/internal/ssa: fix fallthrough return

Fallthrough return needs to be a return block before jumping
to the exit block.

Change-Id: I994de2064da5c326c9cade2c33cbb15bdbce5acb
Reviewed-on: https://go-review.googlesource.com/14256Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
parent 10f38f51
......@@ -114,6 +114,7 @@ func buildssa(fn *Node) (ssafn *ssa.Func, usessa bool) {
// fallthrough to exit
if b := s.endBlock(); b != nil {
b.Kind = ssa.BlockRet
b.AddEdgeTo(s.exit)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment