https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66431
Ian Lance Taylor <ian at airs dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Ian Lance Taylor <ian at airs dot com> --- This is not a bug in either toolchain. The Go language does not fully specify the order of evaluation. In the line return value, closure() it is not specified whether value is read before after closure is called. The two toolchains are making different choices. Both are correct. The program is indeterminate. This is already explained at the code.google.com link that you attached.