aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-02-11 06:36:50 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-02-11 06:36:50 +0000
commit942e57396b4a3322efdec5c8f7a8d5b6665cf875 (patch)
tree45fe596ac062375efb370832e730484ad2805627 /gcc/go
parentced2ec3b26ff0a64c3bbfdc1d0e47db1bc90d3a3 (diff)
downloadgcc-942e57396b4a3322efdec5c8f7a8d5b6665cf875.zip
gcc-942e57396b4a3322efdec5c8f7a8d5b6665cf875.tar.gz
gcc-942e57396b4a3322efdec5c8f7a8d5b6665cf875.tar.bz2
Don't crash on if statement with erroneous conditional.
From-SVN: r170044
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/statements.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/statements.cc b/gcc/go/gofrontend/statements.cc
index 6b45d01..bae4be8 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));