]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix register allocation for == operator
authorUlrich Kunitz <uli.kunitz@gmail.com>
Thu, 20 Aug 2015 16:56:18 +0000 (18:56 +0200)
committerRuss Cox <rsc@golang.org>
Tue, 25 Aug 2015 18:10:14 +0000 (18:10 +0000)
commit6ec1809b8372028e0bf1f87b15cddf06a6dbc8af
tree4fae5afb387b43f93cfc89e065fa0d3b9df1d663
parent05a3b1fce56a95e40512bae9f62656098f198834
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>
src/cmd/compile/internal/gc/cgen.go
test/fixedbugs/issue12226.go [new file with mode: 0644]