From: Ian Lance Taylor Date: Thu, 16 Dec 2010 01:47:10 +0000 (+0000) Subject: Don't crash when copying a call with no arguments. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7892de0c05ab87cf59da5b105b5470e6c6b0ef4f;p=gcc.git Don't crash when copying a call with no arguments. From-SVN: r167897 --- diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h index 53cca06d42e..5d7d90bdb01 100644 --- a/gcc/go/gofrontend/expressions.h +++ b/gcc/go/gofrontend/expressions.h @@ -1235,7 +1235,10 @@ class Call_expression : public Expression Expression* do_copy() { - return Expression::make_call(this->fn_->copy(), this->args_->copy(), + return Expression::make_call(this->fn_->copy(), + (this->args_ == NULL + ? NULL + : this->args_->copy()), this->is_varargs_, this->location()); }