From: Ian Lance Taylor Date: Wed, 7 Mar 2012 16:06:10 +0000 (+0000) Subject: compiler: Fix struct inheriting interface with varargs method. X-Git-Tag: misc/gccgo-go1_1_2~4142 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b0d623bb216914a90b626439f4c96fba683bab2c;p=thirdparty%2Fgcc.git compiler: Fix struct inheriting interface with varargs method. From-SVN: r185060 --- diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index 3c33a6dcd49b..d3a75f425d14 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.