]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.5] cmd/compile: fix register allocation for == operator
authorUlrich Kunitz <uli.kunitz@gmail.com>
Thu, 20 Aug 2015 16:56:18 +0000 (18:56 +0200)
committerChris Broadfoot <cbro@golang.org>
Tue, 8 Sep 2015 18:01:39 +0000 (18:01 +0000)
commit05078023963370af0faa9689373c3bd6c7d6dfe4
treec5905f80d4f12307a9b5bbe30a61a2098bbc0722
parent23ef1e1933f4483572159277a99f2efc5003e1a2
[release-branch.go1.5] cmd/compile: fix register allocation for == operator

The issue 12226 has been caused by the allocation of the same register
for the equality check of two byte values. The code in cgen.go freed the
register for the second operand before the allocation of the register
for the first operand.

Fixes #12226

Change-Id: Ie4dc33a488bd48a17f8ae9b497fd63c1ae390555
Reviewed-on: https://go-review.googlesource.com/13771
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/14227
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/gc/cgen.go
test/fixedbugs/issue12226.go [new file with mode: 0644]