aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2010-12-16 01:47:10 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2010-12-16 01:47:10 +0000
commit7892de0c05ab87cf59da5b105b5470e6c6b0ef4f (patch)
tree0a022356b487bd863c6b2cee11a4b3972930b54e /gcc
parentf7480e3b7954c8574bc3a73adb8a9a5114569b11 (diff)
downloadgcc-7892de0c05ab87cf59da5b105b5470e6c6b0ef4f.zip
gcc-7892de0c05ab87cf59da5b105b5470e6c6b0ef4f.tar.gz
gcc-7892de0c05ab87cf59da5b105b5470e6c6b0ef4f.tar.bz2
Don't crash when copying a call with no arguments.
From-SVN: r167897
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/expressions.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h
index 53cca06..5d7d90b 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());
}