]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: fix handling of struct padding in hash/eq.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Fri, 18 Jan 2013 21:40:32 +0000 (22:40 +0100)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Fri, 18 Jan 2013 21:40:32 +0000 (22:40 +0100)
commit1d6eb2e9fae957ccdc4ea83b965aa41313f7d4bb
tree515e8bd7819dcedc4f1d99748fc8f0eb09f8ee93
parent47568c747d3a407f390045310c3e843b439904f0
cmd/gc: fix handling of struct padding in hash/eq.

The test case of issue 4585 was not passing due to
miscalculation of memequal args, and the previous fix
does not handle padding at the end of a struct.

Handling of padding at end of structs also fixes the case
of [n]T where T is such a padded struct.

Fixes #4585.
(again)

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7133059
src/cmd/gc/subr.c
test/fixedbugs/issue4585.go