compiler: set varargs lowered for imported call expressions
Fix compiler 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.
Fixes golang/go#32922
Change-Id: Ib2d5a13dcfefd73a6c793a0d9255499c4720b46e
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/184919
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/go/expressions.cc b/go/expressions.cc
index d521551..abc4bba 100644
--- a/go/expressions.cc
+++ b/go/expressions.cc
@@ -18338,6 +18338,7 @@
}
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 @@
return (static_cast<unsigned int>(val) + seed) * PRIME;
}
-