projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2e280a
)
Don't crash if erroneous type was not converted.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 3 Mar 2011 06:50:32 +0000
(06:50 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 3 Mar 2011 06:50:32 +0000
(06:50 +0000)
From-SVN: r170646
gcc/go/gofrontend/types.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/types.cc
b/gcc/go/gofrontend/types.cc
index 27104081df41628ace51ccb06ce5a058046a480c..0db599441dd5336cd5fb0955e177fb1adf75d8a4 100644
(file)
--- a/
gcc/go/gofrontend/types.cc
+++ b/
gcc/go/gofrontend/types.cc
@@
-7300,7
+7300,12
@@
Named_type::do_get_tree(Gogo* gogo)
// We are not converting types. This should only be called if the
// type has already been converted.
- gcc_assert(this->is_converted_);
+ if (!this->is_converted_)
+ {
+ gcc_assert(saw_errors());
+ return error_mark_node;
+ }
+
gcc_assert(t != NULL_TREE && TYPE_SIZE(t) != NULL_TREE);
// Complete the tree.