re PR go/61244 (gccgo: ICE in write_specific_type_functions [GoSmith])
authorIan Lance Taylor <ian@gcc.gnu.org>
Sun, 14 Dec 2014 00:55:01 +0000 (00:55 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Sun, 14 Dec 2014 00:55:01 +0000 (00:55 +0000)
PR go/61244
compiler: Traverse type descriptor expressions.

From-SVN: r218715

gcc/go/gofrontend/expressions.cc

index 4d07c223b34f89f13c6500fb9b07b20e501dbcad..21f6cd6c3d89b0cccfbcbc3faf33c944e3293b8b 100644 (file)
@@ -13657,6 +13657,9 @@ class Type_descriptor_expression : public Expression
   { }
 
  protected:
+  int
+  do_traverse(Traverse*);
+
   Type*
   do_type()
   { return Type::make_type_descriptor_ptr_type(); }
@@ -13688,6 +13691,14 @@ class Type_descriptor_expression : public Expression
   Type* type_;
 };
 
+int
+Type_descriptor_expression::do_traverse(Traverse* traverse)
+{
+  if (Type::traverse(this->type_, traverse) == TRAVERSE_EXIT)
+    return TRAVERSE_EXIT;
+  return TRAVERSE_CONTINUE;
+}
+
 // Dump ast representation for a type descriptor expression.
 
 void