From 7892de0c05ab87cf59da5b105b5470e6c6b0ef4f Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 16 Dec 2010 01:47:10 +0000 Subject: [PATCH] Don't crash when copying a call with no arguments. From-SVN: r167897 --- gcc/go/gofrontend/expressions.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()); } -- 2.30.2