Go patch committed: Don't crash on recursive consts

Ian Lance Taylor iant@google.com
Thu Dec 16 08:57:00 GMT 2010


In an invalid Go program a const declared at top-level can refer to
itself, as in

const A = A * 2

The gccgo frontend used to go into an infinite loop when it saw this.
This fixes it.  Bootstrapped and tested 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: 3726 bytes
Desc: const
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101216/a9c19086/attachment.bin>


More information about the Gcc-patches mailing list