aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-03-07 16:06:10 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-03-07 16:06:10 +0000
commitb0d623bb216914a90b626439f4c96fba683bab2c (patch)
treea6c455de1a4e702f4d34d352b409761ef4ac660e /gcc
parent0bd5f4dd2084a3452d529506f1fed0fb10731ab2 (diff)
downloadgcc-b0d623bb216914a90b626439f4c96fba683bab2c.zip
gcc-b0d623bb216914a90b626439f4c96fba683bab2c.tar.gz
gcc-b0d623bb216914a90b626439f4c96fba683bab2c.tar.bz2
compiler: Fix struct inheriting interface with varargs method.
From-SVN: r185060
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/types.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc
index 3c33a6d..d3a75f4 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -3744,8 +3744,12 @@ Function_type::copy_with_receiver(Type* receiver_type) const
go_assert(!this->is_method());
Typed_identifier* receiver = new Typed_identifier("", receiver_type,
this->location_);
- return Type::make_function_type(receiver, this->parameters_,
- this->results_, this->location_);
+ Function_type* ret = Type::make_function_type(receiver, this->parameters_,
+ this->results_,
+ this->location_);
+ if (this->is_varargs_)
+ ret->set_is_varargs();
+ return ret;
}
// Make a function type.