]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/gc: fix walkcompare bugs.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Mon, 24 Feb 2014 18:51:59 +0000 (19:51 +0100)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Mon, 24 Feb 2014 18:51:59 +0000 (19:51 +0100)
commit14b0af4272aa6c638e97cb3364a81962d69dbfc6
treed196a94646d07a28fb89993e522450fe62454f51
parentff15e5c00f7fe3fcec1277f932fbca381fd2d2ad
cmd/gc: fix walkcompare bugs.

Revision c0e0467635ec (cmd/gc: return canonical Node* from temp)
exposed original nodes of temporaries, allowing callers to mutate
their types.

In walkcompare a temporary could be typed as ideal because of
this. Additionnally, assignment of a comparison result to
a custom boolean type was broken.

Fixes #7366.

LGTM=rsc
R=rsc, iant, khr
CC=golang-codereviews
https://golang.org/cl/66930044
src/cmd/gc/walk.c
test/cmp.go
test/fixedbugs/issue7366.go [new file with mode: 0644]