aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2010-12-15 01:05:10 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2010-12-15 01:05:10 +0000
commit662563121cc2970c0d9274d57f187dd1a9ddee61 (patch)
treed9c58dfe3e19dd5a96ce5e2f1bdd7f8651a2a5ef /gcc
parentb427203d213a69768772753abf41b6f618e89b2e (diff)
downloadgcc-662563121cc2970c0d9274d57f187dd1a9ddee61.zip
gcc-662563121cc2970c0d9274d57f187dd1a9ddee61.tar.gz
gcc-662563121cc2970c0d9274d57f187dd1a9ddee61.tar.bz2
Don't get confused by error types in traversal.
From-SVN: r167836
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/gogo.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc
index 0216d6c..3a76adb 100644
--- a/gcc/go/gofrontend/gogo.cc
+++ b/gcc/go/gofrontend/gogo.cc
@@ -4201,6 +4201,8 @@ Traverse::~Traverse()
bool
Traverse::remember_type(const Type* type)
{
+ if (type->is_error_type())
+ return true;
gcc_assert((this->traverse_mask() & traverse_types) != 0
|| (this->traverse_mask() & traverse_expressions) != 0);
// We only have to remember named types, as they are the only ones