projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6042d1d
)
Don't crash import unsafe if "unsafe" was already defined.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 22 Feb 2011 03:23:36 +0000
(
03:23
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 22 Feb 2011 03:23:36 +0000
(
03:23
+0000)
From-SVN: r170389
gcc/go/gofrontend/unsafe.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/unsafe.cc
b/gcc/go/gofrontend/unsafe.cc
index e219f61edae79427c713ead47574ee24f53fe4f2..9d51b4d94244729e705d37fd42523c790b2160f7 100644
(file)
--- a/
gcc/go/gofrontend/unsafe.cc
+++ b/
gcc/go/gofrontend/unsafe.cc
@@
-24,6
+24,13
@@
Gogo::import_unsafe(const std::string& local_name, bool is_local_name_exported,
is_local_name_exported,
"libgo_unsafe",
location, &add_to_globals);
+
+ if (package == NULL)
+ {
+ gcc_assert(saw_errors());
+ return;
+ }
+
package->set_is_imported();
Bindings* bindings = package->bindings();