1
0
mirror of https://github.com/golang/go synced 2024-10-05 16:41:21 -06:00

[dev.ssa] cmd/compile: fix OANDAND and OOROR type

The old backend doesn't like ideal types,
and we want to reuse its stackmap generation.

OOROR and OANDAND expressions have ideal type.
The old backend didn't care,
because those expressions got rewritten away into
jumps before stackmap generation.

Fix the type during conversion.

Change-Id: I488e7499298d9aec71da39c202f6a7235935bc8d
Reviewed-on: https://go-review.googlesource.com/13980
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2015-08-27 10:11:08 -07:00
parent 7cadf23afb
commit 35ad1fcb11

View File

@ -1373,7 +1373,7 @@ func (s *state) expr(n *Node) *ssa.Value {
addEdge(b, bResult)
s.startBlock(bResult)
return s.variable(n, n.Type)
return s.variable(n, Types[TBOOL])
// unary ops
case ONOT, OMINUS, OCOM: