Commit 8d620a1a by Ian Lance Taylor

Don't crash defining function in different package.

From-SVN: r170192
parent e3a69bb4
......@@ -1252,8 +1252,9 @@ Function::get_or_make_decl(Gogo* gogo, Named_object* no, tree id)
this->fndecl_ = decl;
gcc_assert(no->package() == NULL);
if (this->enclosing_ != NULL || Gogo::is_thunk(no))
if (no->package() != NULL)
;
else if (this->enclosing_ != NULL || Gogo::is_thunk(no))
;
else if (Gogo::unpack_hidden_name(no->name()) == "init"
&& !this->type_->is_method())
......
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