diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-03-16 22:34:20 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-03-17 12:17:51 -0700 |
commit | f3e9c98a9f40fc24bb4ecef6aaa94ff799c8d587 (patch) | |
tree | a3451277603bc8fbe2eddce5f4ad63f790129a01 /gcc/go/gofrontend/expressions.cc | |
parent | c86c5195c8c02f5891a222f498c074b373aa946c (diff) | |
download | gcc-f3e9c98a9f40fc24bb4ecef6aaa94ff799c8d587.zip gcc-f3e9c98a9f40fc24bb4ecef6aaa94ff799c8d587.tar.gz gcc-f3e9c98a9f40fc24bb4ecef6aaa94ff799c8d587.tar.bz2 |
compiler: copy receiver argument for go/defer of method call
Test case is https://golang.org/cl/302371.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/302270
Diffstat (limited to 'gcc/go/gofrontend/expressions.cc')
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 101cbe7..5409d26 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -11017,7 +11017,7 @@ Call_expression::do_lower(Gogo* gogo, Named_object* function, // If this is call to a method, call the method directly passing the // object as the first parameter. Bound_method_expression* bme = this->fn_->bound_method_expression(); - if (bme != NULL) + if (bme != NULL && !this->is_deferred_ && !this->is_concurrent_) { Named_object* methodfn = bme->function(); Function_type* mft = (methodfn->is_function() |