Commit 1e9402cb by Ian Lance Taylor

A variable with a preinit block requires an intialization function.

From-SVN: r168198
parent 9d65de21
......@@ -1384,7 +1384,11 @@ Gogo::determine_types()
// 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment