aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-06-13 14:26:07 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-06-13 14:26:07 +0000
commit78a88fb63f23fd9f3d9bf84e31b2f7acc67f25d7 (patch)
tree8b08e05ea8ffe81a60a8eefd51a7351fd23b8b4e /gcc/go
parent45b2222a13eae86582966de6b8203ca75660c1fe (diff)
downloadgcc-78a88fb63f23fd9f3d9bf84e31b2f7acc67f25d7.zip
gcc-78a88fb63f23fd9f3d9bf84e31b2f7acc67f25d7.tar.gz
gcc-78a88fb63f23fd9f3d9bf84e31b2f7acc67f25d7.tar.bz2
compiler: containing small bfunction mixup in Gogo::write_globals
Fix buglet in Gogo::write_globals-- in a couple of places the wrong Bfunction was being used for the containing (not target) function when creating calls for init functions. Reviewed-on: https://go-review.googlesource.com/45510 From-SVN: r249159
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gofrontend/gogo.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 78bd057..2d9adaf 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-c4ecdd3edb9febe72b5527481ae3d7310105ca67
+be5fa26b2b1b5d0755bc1c7ce25f3aa26bea9d9c
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/gogo.cc b/gcc/go/gofrontend/gogo.cc
index 9071bc8..a9d72ff 100644
--- a/gcc/go/gofrontend/gogo.cc
+++ b/gcc/go/gofrontend/gogo.cc
@@ -1504,10 +1504,10 @@ Gogo::write_globals()
Bfunction* initfn = func->get_or_make_decl(this, *p);
Bexpression* func_code =
this->backend()->function_code_expression(initfn, func_loc);
- Bexpression* call = this->backend()->call_expression(initfn, func_code,
+ Bexpression* call = this->backend()->call_expression(init_bfn, func_code,
empty_args,
NULL, func_loc);
- Bstatement* ist = this->backend()->expression_statement(initfn, call);
+ Bstatement* ist = this->backend()->expression_statement(init_bfn, call);
init_stmts.push_back(ist);
}