]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use generated temps in bool codegen
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 8 Jun 2015 23:21:50 +0000 (16:21 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Tue, 9 Jun 2015 17:38:26 +0000 (17:38 +0000)
commita44becef4a7e3af238a1546670717c78eb0069db
tree5496149a558c1ecddfe686298640caa30a8a1c73
parentc72b8aa3b36632f7bf96111346a554667dd08f7f
cmd/compile: use generated temps in bool codegen

Bool codegen was generating a temp for function calls
and other complex expressions, but was not using it.

This was a refactoring bug introduced by CL 7853.
The cmp code used to do (in short):

l, r := &n1, &n2

It was changed to:

l, r := nl, nr

But the requisite assignments:

nl, nr = &n1, &n2

were only introduced on one of two code paths.

Fixes #10654.

Change-Id: Ie8de0b3a333842a048d4308e02911bb10c6915ce
Reviewed-on: https://go-review.googlesource.com/10844
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Minux Ma <minux@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/cgen.go
test/fixedbugs/issue10654.go [new file with mode: 0644]