commit | 3f597287b6b858794dabdfe1bf83b386aad18102 | [log] [tgz] |
---|---|---|
author | Ian Lance Taylor <iant@golang.org> | Tue Mar 26 13:00:03 2024 -0700 |
committer | Ian Lance Taylor <iant@golang.org> | Wed Mar 27 18:35:31 2024 +0000 |
tree | 32bf02dbe99102f328e1dea288632bc5d5caf9f4 | |
parent | e15a14e410b8fc5d28012d5b313cb6c8476c7df9 [diff] |
compiler: initialize local variable in lower_method_expression Fixes https://gcc.gnu.org/PR114463 Change-Id: I4d0a020dc5c3ae449cdc0007a288b1919b398f8f Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/574476 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
diff --git a/go/expressions.cc b/go/expressions.cc index 51ff020..8429e55 100644 --- a/go/expressions.cc +++ b/go/expressions.cc
@@ -9059,7 +9059,7 @@ 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);