From: Keith Randall Date: Thu, 3 Sep 2015 21:28:52 +0000 (-0700) Subject: [dev.ssa] cmd/compile/internal/ssa: fix fallthrough return X-Git-Tag: go1.7beta1~1623^2^2~211 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d9f2cafb5050fd264777f175ceb2576d734b7360;p=gostls13.git [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/14256 Reviewed-by: Josh Bleecher Snyder --- diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go index f0cad90d40..c2ad49e954 100644 --- a/src/cmd/compile/internal/gc/ssa.go +++ b/src/cmd/compile/internal/gc/ssa.go @@ -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) }