diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-02-15 18:55:01 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-02-15 18:55:01 +0000 |
commit | 8d620a1a26f18400eda6130f42aac8f00c8d291f (patch) | |
tree | 6703f955179ffe9dc7b5ac2dc0407ba0d7af53e7 | |
parent | e3a69bb44f336a3f388cb9cd51dd7f966accf453 (diff) | |
download | gcc-8d620a1a26f18400eda6130f42aac8f00c8d291f.zip gcc-8d620a1a26f18400eda6130f42aac8f00c8d291f.tar.gz gcc-8d620a1a26f18400eda6130f42aac8f00c8d291f.tar.bz2 |
Don't crash defining function in different package.
From-SVN: r170192
-rw-r--r-- | gcc/go/gofrontend/gogo-tree.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/gogo-tree.cc b/gcc/go/gofrontend/gogo-tree.cc index 73f2503..3228c42 100644 --- a/gcc/go/gofrontend/gogo-tree.cc +++ b/gcc/go/gofrontend/gogo-tree.cc @@ -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()) |