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);