Go patch committed: Fix indirection through circular type

Ian Lance Taylor iant@google.com
Thu Mar 1 06:00:00 GMT 2012


This patch to the Go frontend fixes the handling of pointer indirection
through a circular type.  The gcc middle-end can not represent a
circular type, as such a construct can not exist in C (in Go you get one
by writing "type T *T").  We handle this by using void* and introducing
a type cast on the indirection.  With the use of the Gcc_backend
interface, we now use a general void* rather than specifically
ptr_type_node which is what we used before.  This patch updates the
handling of pointer indirection to check for this case.  Bootstrapped
and ran Go testsuite on x86_64-unknown-linux-gnu.  Committed to
mainline.

Ian

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


More information about the Gcc-patches mailing list