Go patch committed: Generate preinit when needed

Ian Lance Taylor iant@google.com
Wed Jan 19 20:55:00 GMT 2011

This patch to the Go frontend fixes the compiler to ensure that an
initialization function is generated whenever a global variable has a
preinit statement.  This can happen for something like

var a = f() + g() + h()

in order to enforce the order of evaluation rules.  Bootstrapped and ran
Go testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 6298 bytes
Desc: preinit
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110119/87967a3d/attachment.bin>

More information about the Gcc-patches mailing list