From 01bd5703f577e2c3331c27c623d7a37c85ca2ffa Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 24 Feb 2011 15:42:55 +0000 Subject: [PATCH] Don't delete old arguments when lowering varargs. From-SVN: r170474 --- gcc/go/gofrontend/expressions.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 259faa128ec..cebcbca7a07 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -8281,8 +8281,9 @@ Call_expression::do_lower(Gogo* gogo, Named_object* function, int) for (size_t i = 0; i < rc; ++i) args->push_back(Expression::make_call_result(call, i)); // We can't return a new call expression here, because this - // one may be referenced by Call_result expressions. FIXME. - delete this->args_; + // one may be referenced by Call_result expressions. We + // also can't delete the old arguments, because we may still + // traverse them somewhere up the call stack. FIXME. this->args_ = args; } } -- 2.30.2