projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
017096c
)
Avoid crash when selecting on non-channel.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 4 Jan 2011 17:42:21 +0000
(17:42 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 4 Jan 2011 17:42:21 +0000
(17:42 +0000)
From-SVN: r168473
gcc/go/gofrontend/statements.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/statements.cc
b/gcc/go/gofrontend/statements.cc
index b5ded99e158c57028c00445b18c638e783d2eee5..3498598754a3b4cabcf6ab8a2c5603b5f6d5beea 100644
(file)
--- a/
gcc/go/gofrontend/statements.cc
+++ b/
gcc/go/gofrontend/statements.cc
@@
-4165,6
+4165,14
@@
Select_clauses::get_tree(Translate_context* context,
continue;
}
+ if (p->channel()->type()->channel_type() == NULL)
+ {
+ // We should have given an error in the send or receive
+ // statement we created via lowering.
+ gcc_assert(saw_errors());
+ return error_mark_node;
+ }
+
tree channel_tree = p->channel()->get_tree(context);
if (channel_tree == error_mark_node)
return error_mark_node;