Don't crash on if statement with erroneous conditional.

From-SVN: r170044
This commit is contained in:
Ian Lance Taylor 2011-02-11 06:36:50 +00:00
parent ced2ec3b26
commit 942e57396b

View file

@ -2994,7 +2994,9 @@ If_statement::do_may_fall_through() const
tree
If_statement::do_get_tree(Translate_context* context)
{
gcc_assert(this->cond_ == NULL || this->cond_->type()->is_boolean_type());
gcc_assert(this->cond_ == NULL
|| this->cond_->type()->is_boolean_type()
|| this->cond_->type()->is_error_type());
tree cond_tree = (this->cond_ == NULL
? boolean_true_node
: this->cond_->get_tree(context));