diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-22 01:37:30 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-22 01:37:30 +0000 |
commit | 7b17528592dd244b7078b7d9ed6cbe540c8a3eb0 (patch) | |
tree | 50c2edb4092ed5e7e352c92f6d1ead59d7480303 | |
parent | 7b8d861ffb21920a8a15c4210ce11cce5f72fff3 (diff) | |
download | gcc-7b17528592dd244b7078b7d9ed6cbe540c8a3eb0.tar.gz |
Fix uninitialized variable when looking up '_'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168158 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/go/gofrontend/gogo.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index 59141fbfd6f..eb530d1eb9c 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -415,6 +415,9 @@ Gogo::current_block() Named_object* Gogo::lookup(const std::string& name, Named_object** pfunction) const { + if (pfunction != NULL) + *pfunction = NULL; + if (Gogo::is_sink_name(name)) return Named_object::make_sink(); @@ -431,9 +434,6 @@ Gogo::lookup(const std::string& name, Named_object** pfunction) const } } - if (pfunction != NULL) - *pfunction = NULL; - if (this->package_ != NULL) { Named_object* ret = this->package_->bindings()->lookup(name); |