From: Ian Lance Taylor Date: Fri, 11 Feb 2011 06:36:50 +0000 (+0000) Subject: Don't crash on if statement with erroneous conditional. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=942e57396b4a3322efdec5c8f7a8d5b6665cf875;p=gcc.git Don't crash on if statement with erroneous conditional. From-SVN: r170044 --- diff --git a/gcc/go/gofrontend/statements.cc b/gcc/go/gofrontend/statements.cc index 6b45d0111e0..bae4be8e31b 100644 --- a/gcc/go/gofrontend/statements.cc +++ b/gcc/go/gofrontend/statements.cc @@ -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));