Commit 7b858018 authored by Keith Randall's avatar Keith Randall

[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/11542Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
parent 929c2aa2
...@@ -380,6 +380,7 @@ func (s *state) stmt(n *Node) { ...@@ -380,6 +380,7 @@ func (s *state) stmt(n *Node) {
s.Unimplementedf("cond n.Left == nil: %v", n) s.Unimplementedf("cond n.Left == nil: %v", n)
} }
s.startBlock(bCond) s.startBlock(bCond)
s.stmtList(n.Left.Ninit)
cond := s.expr(n.Left) cond := s.expr(n.Left)
b = s.endBlock() b = s.endBlock()
b.Kind = ssa.BlockIf b.Kind = ssa.BlockIf
......
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