]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/gc: fix computation of equality class of types.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 2 Jul 2013 07:08:43 +0000 (09:08 +0200)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Tue, 2 Jul 2013 07:08:43 +0000 (09:08 +0200)
commit428ea6865c7eff6d8632faa18335c64d4ae9f422
tree2da4ef887a923970bf4beefa78fc08422f33c119
parentefced7c6e984f26b4c275b19ba61f2c2629d95ea
cmd/gc: fix computation of equality class of types.

A struct with a single field was considered as equivalent to the
field type, which is incorrect is the field is blank.

Fields with padding could make the compiler think some
types are comparable when they are not.

Fixes #5698.

R=rsc, golang-dev, daniel.morsing, bradfitz, gri, r
CC=golang-dev
https://golang.org/cl/10271046
src/cmd/gc/subr.c
test/blank.go
test/blank1.go
test/cmp.go
test/cmp6.go
test/fixedbugs/issue5698.go [new file with mode: 0644]