This patch by Chris Manghane changes the Go frontend to not check for an invalid constant when lowering a binary expression. This fixes https://golang.org/issue/12615 . Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline.
Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 229096) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -302d8abbc499e28088d758ae8b2c024d8e50b9b3 +11e249a59e8c627fe9c2938c38e39cb1efefb1fb The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: gcc/go/gofrontend/expressions.cc =================================================================== --- gcc/go/gofrontend/expressions.cc (revision 229096) +++ gcc/go/gofrontend/expressions.cc (working copy) @@ -4909,14 +4909,7 @@ Binary_expression::do_lower(Gogo* gogo, Numeric_constant nc; if (!Binary_expression::eval_constant(op, &left_nc, &right_nc, location, &nc)) - { - if (nc.is_invalid()) - { - go_assert(saw_errors()); - return Expression::make_error(location); - } return this; - } return nc.expression(location); } }