From 761bd3334833d7b5d53fb6b233bd767237f1c1b6 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 14 Dec 2014 00:55:01 +0000 Subject: [PATCH] re PR go/61244 (gccgo: ICE in write_specific_type_functions [GoSmith]) PR go/61244 compiler: Traverse type descriptor expressions. From-SVN: r218715 --- gcc/go/gofrontend/expressions.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 4d07c223b34..21f6cd6c3d8 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -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 -- 2.30.2