From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2116) id 07BA93856DCD; Mon, 27 Jun 2022 16:51:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07BA93856DCD MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Ian Lance Taylor To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-1301] compiler: always initialize mpfr in integer import X-Act-Checkin: gcc X-Git-Author: Ian Lance Taylor X-Git-Refname: refs/heads/master X-Git-Oldrev: a1f8a3860fe5c83a023688c29636b5abe03db949 X-Git-Newrev: 722750a44a93ce7d23e09df240d8ab700a2d30e6 Message-Id: <20220627165106.07BA93856DCD@sourceware.org> Date: Mon, 27 Jun 2022 16:51:06 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2022 16:51:06 -0000 https://gcc.gnu.org/g:722750a44a93ce7d23e09df240d8ab700a2d30e6 commit r13-1301-g722750a44a93ce7d23e09df240d8ab700a2d30e6 Author: Ian Lance Taylor Date: Fri Jun 24 17:18:15 2022 -0700 compiler: always initialize mpfr in integer import Test case is https://go.dev/cl/413980. Fixes golang/go#52862 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/413981 Diff: --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/expressions.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index e20212e990a..f84347ea575 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -6a7ba754e5d98efe0875f1f41f40098e976e7958 +6edae0ef6521569e8f949aaaafa9dc1139825051 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/expressions.cc b/gcc/go/gofrontend/expressions.cc index 734ecb9492e..135dae02262 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -2715,7 +2715,7 @@ Integer_expression::do_import(Import_expression* imp, Location loc) return Expression::make_error(loc); } if (pos == std::string::npos) - mpfr_set_ui(real, 0, MPFR_RNDN); + mpfr_init_set_ui(real, 0, MPFR_RNDN); else { std::string real_str = num.substr(0, pos);