mirror of
https://github.com/golang/go.git
synced 2025-05-24 17:01:26 +00:00
[dev.ssa] cmd/compile: fix type of nil ptr in check
Change-Id: If7a6ab6b1336dbacb006f562be7f153eb93e7253 Reviewed-on: https://go-review.googlesource.com/14025 Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
f8093b8f24
commit
67ac8a3b22
@ -2039,7 +2039,8 @@ func (s *state) lenMap(n *Node, x *ssa.Value) *ssa.Value {
|
||||
// return *((*int)n)
|
||||
// }
|
||||
lenType := n.Type
|
||||
cmp := s.newValue2(ssa.OpEqPtr, Types[TBOOL], x, s.zeroVal(lenType))
|
||||
nilValue := s.newValue0(ssa.OpConstNil, Types[TUINTPTR])
|
||||
cmp := s.newValue2(ssa.OpEqPtr, Types[TBOOL], x, nilValue)
|
||||
b := s.endBlock()
|
||||
b.Kind = ssa.BlockIf
|
||||
b.Control = cmp
|
||||
|
Loading…
x
Reference in New Issue
Block a user