From: Josh Bleecher Snyder Date: Thu, 27 Aug 2015 17:11:08 +0000 (-0700) Subject: [dev.ssa] cmd/compile: fix OANDAND and OOROR type X-Git-Tag: go1.7beta1~1623^2^2~241 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=35ad1fcb11c64ebd7e54f8eebf065ba118045357;p=gostls13.git [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 --- diff --git a/src/cmd/compile/internal/gc/ssa.go b/src/cmd/compile/internal/gc/ssa.go index a0ad2caeaa..0c0a6a36da 100644 --- a/src/cmd/compile/internal/gc/ssa.go +++ b/src/cmd/compile/internal/gc/ssa.go @@ -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: