]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile/internal/gc: Interpret init list of OFOR conditions
authorKeith Randall <khr@golang.org>
Fri, 26 Jun 2015 03:01:45 +0000 (20:01 -0700)
committerKeith Randall <khr@golang.org>
Fri, 26 Jun 2015 04:08:44 +0000 (04:08 +0000)
Fixes build.  Some variables are initialized in this list.

Q: How do we tell that we've included all the required Ninit lists?

Change-Id: I96b3f03c291440130303a2b95a651e97e4d8113c
Reviewed-on: https://go-review.googlesource.com/11542
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/gc/ssa.go

index 4e0f4b0cc6b6ef1a714db83a7819c765af79f4d7..8a81dbd57f2c80f9a639ad71caff32c7782b11c2 100644 (file)
@@ -380,6 +380,7 @@ func (s *state) stmt(n *Node) {
                        s.Unimplementedf("cond n.Left == nil: %v", n)
                }
                s.startBlock(bCond)
+               s.stmtList(n.Left.Ninit)
                cond := s.expr(n.Left)
                b = s.endBlock()
                b.Kind = ssa.BlockIf