]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix uninitialized variable when looking up '_'.
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 22 Dec 2010 01:37:30 +0000 (01:37 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 22 Dec 2010 01:37:30 +0000 (01:37 +0000)
From-SVN: r168158

gcc/go/gofrontend/gogo.cc

index 59141fbfd6fb26d692eaeaf994907de581ad7a6b..eb530d1eb9c3c32ed9af40f69e86e69612b903f4 100644 (file)
@@ -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);