aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-10-01 15:11:22 -0700
committerIan Lance Taylor <iant@golang.org>2020-10-01 16:10:17 -0700
commit3e52eaab8c57ad06bcd553f140923a34e5749991 (patch)
treeaefb9c7afe93c5278b9850695b7bd04af33cd99b /gcc/go
parent4c69e61f4307865b95151006e480ae2022b30454 (diff)
downloadgcc-3e52eaab8c57ad06bcd553f140923a34e5749991.zip
gcc-3e52eaab8c57ad06bcd553f140923a34e5749991.tar.gz
gcc-3e52eaab8c57ad06bcd553f140923a34e5749991.tar.bz2
compiler: set varargs correctly for type of method expression
Fixes golang/go#41737 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/258977
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gofrontend/types.cc8
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 8d9fda5..9482740 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-c9c084bce713e258721e12041a351ec8ad33ad17
+801c458a562d22260ff176c26d65639dd32c8a90
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc
index 7f65b4a..e7a742f 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -5350,8 +5350,12 @@ Function_type::copy_with_receiver_as_param(bool want_pointer_receiver) const
++p)
new_params->push_back(*p);
}
- return Type::make_function_type(NULL, new_params, this->results_,
- this->location_);
+ Function_type* ret = Type::make_function_type(NULL, new_params,
+ this->results_,
+ this->location_);
+ if (this->is_varargs_)
+ ret->set_is_varargs();
+ return ret;
}
// Make a copy of a function type ignoring any receiver and adding a