Message ID | mcr62ule0f2.fsf@google.com |
---|---|
State | New |
Headers | show |
diff -r e29943434443 go/gogo.cc --- a/go/gogo.cc Wed Dec 22 17:20:35 2010 -0800 +++ b/go/gogo.cc Wed Dec 22 17:32:25 2010 -0800 @@ -1384,7 +1384,11 @@ // If this is a global variable which requires runtime // initialization, we need an initialization function. - if (!variable->is_global() || variable->init() == NULL) + if (!variable->is_global()) + ; + else if (variable->has_pre_init()) + this->need_init_fn_ = true; + else if (variable->init() == NULL) ; else if (variable->type()->interface_type() != NULL) this->need_init_fn_ = true;