Avoid crash when selecting on non-channel.

From-SVN: r168473
This commit is contained in:
Ian Lance Taylor 2011-01-04 17:42:21 +00:00
parent 017096ca1c
commit b6493d3890
1 changed files with 8 additions and 0 deletions

View File

@ -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;