Go patch committed: Fix bug converting unnamed types

Ian Lance Taylor iant@google.com
Sat Dec 1 00:15:00 GMT 2012


This patch to the Go frontend fixes a bug converting unnamed types to
GIMPLE.  It's important to convert all identical unnamed Go types to the
same GIMPLE type, to avoid middle-end errors in assignments and type
conversions.  This is done via a hash table.  Unfortunately
Type::get_backend_placeholder was not using the hash table, so it was
possible to get two different placeholder types for two identical
unnamed Go types, leading in some cases to getting two different GIMPLE
types.  This would then cause an ICE if the two types appeared in an
assignment of some sort.

This patch fixes the problem by recording placeholder information in the
hash table, so that get_backend_placeholder can use it.  Bootstrapped
and ran Go testsuite on x86_64-unknown-linux-gnu.  Committed to mainline
and 4.7 branch.

Ian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 8277 bytes
Desc: patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121201/22df618d/attachment.bin>


More information about the Gcc-patches mailing list