This patch by Chris Manghane fixes the export data for complex constants with a zero imaginary part. This is https://code.google.com/p/gofrontend/issues/detail?id=31 . Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline.
Ian
diff -r fd1c78fac62c go/expressions.cc --- a/go/expressions.cc Tue Jan 06 15:21:38 2015 -0800 +++ b/go/expressions.cc Tue Jan 06 16:12:09 2015 -0800 @@ -2450,7 +2450,7 @@ if (!mpfr_zero_p(mpc_realref(val))) { Float_expression::export_float(exp, mpc_realref(val)); - if (mpfr_sgn(mpc_imagref(val)) > 0) + if (mpfr_sgn(mpc_imagref(val)) >= 0) exp->write_c_string("+"); } Float_expression::export_float(exp, mpc_imagref(val));