From: Ian Lance Taylor Date: Tue, 13 Jun 2017 14:26:07 +0000 (+0000) Subject: compiler: containing small bfunction mixup in Gogo::write_globals X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=78a88fb63f23fd9f3d9bf84e31b2f7acc67f25d7;p=gcc.git 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 --- diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 78bd0574fb6..2d9adafbdd5 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 9071bc8f62d..a9d72ff4aa0 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); }