1
0
mirror of https://github.com/golang/go synced 2024-11-24 07:50:13 -07:00

[dev.ssa] cmd/compile/internal/gc: Interpret init list of OFOR conditions

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>
This commit is contained in:
Keith Randall 2015-06-25 20:01:45 -07:00
parent 929c2aa2ae
commit 7b858018b3

View 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