This Go frontend patch by Than McIntosh fixes a Go frontend buglet: varargs lowering happens before inlinable function bodies are written out to export data, so set the "varargs lowered" flag on call expressions that we import. This fixes https://golang.org/issue/32922. The test case is in https://golang.org/cl/184918. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.
Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 273009) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -ae7d7e05bce19aefaa27efe2ee797933aafbef06 +bf66d40bc7adb438dcfac85d73bfa7b17217eed9 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 272944) +++ gcc/go/gofrontend/expressions.cc (working copy) @@ -18338,6 +18338,7 @@ Expression::import_expression(Import_exp } imp->require_c_string(")"); expr = Expression::make_call(expr, args, is_varargs, loc); + expr->call_expression()->set_varargs_are_lowered(); } else if (imp->match_c_string("[")) { @@ -19389,4 +19390,3 @@ Numeric_constant::hash(unsigned int seed return (static_cast<unsigned int>(val) + seed) * PRIME; } -