Allow labels to be unreachable via fallthrough from above.
Implement OCONVNOP.
Change-Id: I6869993cad8a27ad134dd637de89a40117daf47b
Reviewed-on: https://go-review.googlesource.com/11001
Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com>
s.labels[n.Left.Sym.Name] = t
}
// go to that label (we pretend "label:" is preceded by "goto label")
- b := s.endBlock()
- addEdge(b, t)
+ if b := s.endBlock(); b != nil {
+ addEdge(b, t)
+ }
if n.Op == OLABEL {
// next we work on the label's target block
log.Fatalf("unhandled OLITERAL %v", n.Val().Ctype())
return nil
}
+ case OCONVNOP:
+ x := s.expr(n.Left)
+ return s.newValue1(ssa.OpConvNop, n.Type, nil, x)
// binary ops
case OLT: