Go patch committed: Fix bug comparing struct/array to interface

4 views
Skip to first unread message

Ian Lance Taylor

unread,
Aug 28, 2014, 11:06:20 PM8/28/14
to gcc-p...@gcc.gnu.org, gofront...@googlegroups.com
The Go frontend had a bug comparing a struct or array value to an
interface value when the struct or array was not addressable. The code
that was supposed to force the struct/array into a temporary variable
did not fire, because the compiler erroneously tried to handle it as a
straight struct/array comparison. This patch fixes the problem.
Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline and 4.9 branch.

The test case has been committed to the master testsuite; see
https://codereview.appspot.com/135170043 . This fixes
http://golang.org/issue/8612 .

Ian

foo.patch
Reply all
Reply to author
Forward
0 new messages