projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
183d062
)
Don't crash with go or defer of bad call.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 16 Dec 2010 00:15:16 +0000
(
00:15
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 16 Dec 2010 00:15:16 +0000
(
00:15
+0000)
From-SVN: r167886
gcc/go/gofrontend/statements.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/statements.cc
b/gcc/go/gofrontend/statements.cc
index
2d17797
..
f77764f
100644
(file)
--- a/
gcc/go/gofrontend/statements.cc
+++ b/
gcc/go/gofrontend/statements.cc
@@
-1812,7
+1812,13
@@
Thunk_statement::simplify_statement(Gogo* gogo, Block* block)
Call_expression* ce = this->call_->call_expression();
Function_type* fntype = ce->get_function_type();
- if (fntype == NULL || this->is_simple(fntype))
+ if (fntype == NULL)
+ {
+ gcc_assert(saw_errors());
+ this->set_is_error();
+ return false;
+ }
+ if (this->is_simple(fntype))
return false;
Expression* fn = ce->fn();