From: Ian Lance Taylor Date: Tue, 26 Mar 2024 20:00:03 +0000 (-0700) Subject: compiler: initialize local variable in lower_method_expression X-Git-Tag: basepoints/gcc-15~446 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f85d3362cdb4bab611508dd9a38d9015c02ff7ca;p=thirdparty%2Fgcc.git compiler: initialize local variable in lower_method_expression Fixes PR go/114463 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/574476 --- diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 73cb095322ce..de6e21fb3b53 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -e15a14e410b8fc5d28012d5b313cb6c8476c7df9 +3f597287b6b858794dabdfe1bf83b386aad18102 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 51ff02061295..8429e553eac9 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -9059,7 +9059,7 @@ Selector_expression::lower_method_expression(Gogo* gogo) Named_type* nt = type->named_type(); Struct_type* st = type->struct_type(); - bool is_ambiguous; + bool is_ambiguous = false; Method* method = NULL; if (nt != NULL) method = nt->method_function(name, &is_ambiguous);