Patchwork go patch committed: Change gcc_unreachable to go_unreachable

login
register
mail settings
Submitter Ian Taylor
Date April 23, 2011, 12:04 a.m.
Message ID <mcrliz1vnmm.fsf@google.com>
Download mbox | patch
Permalink /patch/92599/
State New
Headers show

Comments

Ian Taylor - April 23, 2011, 12:04 a.m.
This patch to the Go frontend changes uses of gcc_unreachable to be
go_unreachable instead.  The patch is from Evan Shaw.  Bootstrapped and
ran Go testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

Patch

diff -r 969c61627ab5 go/README
--- a/go/README	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/README	Fri Apr 22 17:00:20 2011 -0700
@@ -24,8 +24,6 @@ 
     features such as %<%> for appropriate quoting.
   + Localization may be an issue.
 
-* Use of gcc_unreachable.
-
 This compiler works, but the code is a work in progress.  Notably, the
 support for garbage collection is ineffective and needs a complete
 rethinking.  The frontend pays little attention to its memory usage
diff -r 969c61627ab5 go/dataflow.cc
--- a/go/dataflow.cc	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/dataflow.cc	Fri Apr 22 17:00:20 2011 -0700
@@ -201,7 +201,7 @@ 
 
   // We can't have two variables with the same name in the same
   // location.
-  gcc_unreachable();
+  go_unreachable();
 }
 
 // Class Dataflow.
diff -r 969c61627ab5 go/expressions.cc
--- a/go/expressions.cc	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/expressions.cc	Fri Apr 22 17:00:20 2011 -0700
@@ -148,7 +148,7 @@ 
 void
 Expression::do_export(Export*) const
 {
-  gcc_unreachable();
+  go_unreachable();
 }
 
 // Warn that the value of the expression is not used.
@@ -665,7 +665,7 @@ 
       return build_complex(type, real, imag);
     }
   else
-    gcc_unreachable();
+    go_unreachable();
 }
 
 // Return a tree for VAL in TYPE.
@@ -703,7 +703,7 @@ 
       return build_complex(type, build_real(TREE_TYPE(type), r2), imag);
     }
   else
-    gcc_unreachable();
+    go_unreachable();
 }
 
 // Return a tree for REAL/IMAG in TYPE.
@@ -731,7 +731,7 @@ 
 			   build_real(TREE_TYPE(type), r4));
     }
   else
-    gcc_unreachable();
+    go_unreachable();
 }
 
 // Return a tree which evaluates to true if VAL, of arbitrary integer
@@ -880,7 +880,7 @@ 
 
   tree
   do_get_tree(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   // The type which we are representing as an expression.
@@ -939,7 +939,7 @@ 
   else if (this->variable_->is_result_variable())
     return this->variable_->result_var_value()->type();
   else
-    gcc_unreachable();
+    go_unreachable();
 }
 
 // Determine the type of a reference to a variable.
@@ -964,7 +964,7 @@ 
   else if (this->variable_->is_result_variable())
     this->variable_->result_var_value()->set_address_taken();
   else
-    gcc_unreachable();
+    go_unreachable();
 }
 
 // Get the tree for a reference to a variable.
@@ -983,7 +983,7 @@ 
   else if (this->variable_->is_result_variable())
     is_in_heap = this->variable_->result_var_value()->is_in_heap();
   else
-    gcc_unreachable();
+    go_unreachable();
   if (is_in_heap)
     {
       ret = build_fold_indirect_ref_loc(this->location(), ret);
@@ -1160,7 +1160,7 @@ 
   else if (this->function_->is_function_declaration())
     return this->function_->func_declaration_value()->type();
   else
-    gcc_unreachable();
+    go_unreachable();
 }
 
 // Get the tree for a function expression without evaluating the
@@ -1175,7 +1175,7 @@ 
   else if (this->function_->is_function_declaration())
     fntype = this->function_->func_declaration_value()->type();
   else
-    gcc_unreachable();
+    go_unreachable();
 
   // Builtin functions are handled specially by Call_expression.  We
   // can't take their address.
@@ -1198,7 +1198,7 @@ 
   else if (no->is_function_declaration())
     fndecl = no->func_declaration_value()->get_or_make_decl(gogo, no, id);
   else
-    gcc_unreachable();
+    go_unreachable();
 
   if (fndecl == error_mark_node)
     return error_mark_node;
@@ -1321,7 +1321,7 @@ 
       error_at(location, "unexpected reference to package");
       return Expression::make_error(location);
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -1980,7 +1980,7 @@ 
       max_exp = 1024;
       break;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
   if (exp > max_exp)
     {
@@ -2220,7 +2220,7 @@ 
       max_exp = 1024;
       break;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 
   // A NaN or Infinity always fits in the range of the type.
@@ -2780,7 +2780,7 @@ 
   else if (TREE_CODE(type_tree) == COMPLEX_TYPE)
     ret = fold(convert_to_complex(type_tree, const_tree));
   else
-    gcc_unreachable();
+    go_unreachable();
   return ret;
 }
 
@@ -2899,12 +2899,12 @@ 
  protected:
   Expression*
   do_lower(Gogo*, Named_object*, int)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   // There should only ever be one of these.
   Expression*
   do_copy()
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 };
 
 // Make an iota expression.  This is only called for one case: the
@@ -3368,7 +3368,7 @@ 
 	  || expr_type->is_unsafe_pointer_type())
 	ret = fold(convert_to_integer(type_tree, expr_tree));
       else
-	gcc_unreachable();
+	go_unreachable();
     }
   else if (type->float_type() != NULL)
     {
@@ -3376,14 +3376,14 @@ 
 	  || expr_type->float_type() != NULL)
 	ret = fold(convert_to_real(type_tree, expr_tree));
       else
-	gcc_unreachable();
+	go_unreachable();
     }
   else if (type->complex_type() != NULL)
     {
       if (expr_type->complex_type() != NULL)
 	ret = fold(convert_to_complex(type_tree, expr_tree));
       else
-	gcc_unreachable();
+	go_unreachable();
     }
   else if (type->is_string_type()
 	   && expr_type->integer_type() != NULL)
@@ -3649,7 +3649,7 @@ 
       return convert_to_integer(type_tree, expr_tree);
     }
   else
-    gcc_unreachable();
+    go_unreachable();
 
   if (use_view_convert)
     return fold_build1_loc(loc, VIEW_CONVERT_EXPR, type_tree, expr_tree);
@@ -3977,7 +3977,7 @@ 
     case OPERATOR_MULT:
       return false;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -4001,7 +4001,7 @@ 
     case OPERATOR_MULT:
       return false;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -4028,7 +4028,7 @@ 
     case OPERATOR_MULT:
       return false;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -4114,7 +4114,7 @@ 
       }
 
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -4155,7 +4155,7 @@ 
       break;
 
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -4202,7 +4202,7 @@ 
       break;
 
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -4312,7 +4312,7 @@ 
       }
 
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -4338,7 +4338,7 @@ 
     case OPERATOR_AND:
     case OPERATOR_MULT:
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
   this->expr_->export_expression(exp);
 }
@@ -4364,7 +4364,7 @@ 
       op = OPERATOR_XOR;
       break;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
   imp->require_c_string(" ");
   Expression* expr = Expression::import_expression(imp);
@@ -4429,7 +4429,7 @@ 
     case OPERATOR_GE:
       return i >= 0;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -4469,7 +4469,7 @@ 
     case OPERATOR_GE:
       return i >= 0;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -4510,7 +4510,7 @@ 
     case OPERATOR_NOTEQ:
       return !is_equal;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -4617,7 +4617,7 @@ 
       }
       break;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 
   Type* type = left_type;
@@ -4702,7 +4702,7 @@ 
     case OPERATOR_RSHIFT:
       return false;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 
   Type* type = left_type;
@@ -5061,7 +5061,7 @@ 
     case OPERATOR_RSHIFT:
       return false;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 
   Type* type = left_type;
@@ -5619,7 +5619,7 @@ 
       return this->left_->type();
 
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -5810,7 +5810,7 @@ 
       break;
 
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 
   return true;
@@ -5976,7 +5976,7 @@ 
       code = BIT_AND_EXPR;
       break;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 
   tree type = use_left_type ? TREE_TYPE(left) : TREE_TYPE(right);
@@ -6145,7 +6145,7 @@ 
       exp->write_c_string(" &^ ");
       break;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
   this->right_->export_expression(exp);
   exp->write_c_string(")");
@@ -6308,7 +6308,7 @@ 
       code = GE_EXPR;
       break;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 
   if (left_type->is_string_type() && right_type->is_string_type())
@@ -6760,7 +6760,7 @@ 
   else if (name == "Sizeof")
     this->code_ = BUILTIN_SIZEOF;
   else
-    gcc_unreachable();
+    go_unreachable();
 }
 
 // Return whether this is a call to recover.  This is a virtual
@@ -7178,7 +7178,7 @@ 
 	    }
 	}
       else
-	gcc_unreachable();
+	go_unreachable();
       mpz_set_ui(val, val_long);
       *ptype = NULL;
       return true;
@@ -7307,7 +7307,7 @@ 
     {
     case BUILTIN_INVALID:
     default:
-      gcc_unreachable();
+      go_unreachable();
 
     case BUILTIN_NEW:
     case BUILTIN_MAKE:
@@ -7470,7 +7470,7 @@ 
 		  else if (atype->is_abstract_boolean_type())
 		    want_type = Type::lookup_bool_type();
 		  else
-		    gcc_unreachable();
+		    go_unreachable();
 		  subcontext.type = want_type;
 		}
 	    }
@@ -7725,7 +7725,7 @@ 
       break;
 
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -7741,7 +7741,7 @@ 
     case BUILTIN_INVALID:
     case BUILTIN_NEW:
     case BUILTIN_MAKE:
-      gcc_unreachable();
+      go_unreachable();
 
     case BUILTIN_LEN:
     case BUILTIN_CAP:
@@ -7813,7 +7813,7 @@ 
 					      arg_tree);
 	      }
 	    else
-	      gcc_unreachable();
+	      go_unreachable();
 	  }
 	else
 	  {
@@ -7841,7 +7841,7 @@ 
 					      arg_tree);
 	      }
 	    else
-	      gcc_unreachable();
+	      go_unreachable();
 	  }
 
 	if (val_tree == error_mark_node)
@@ -7966,7 +7966,7 @@ 
 		    fnname = "__go_print_slice";
 		  }
 		else
-		  gcc_unreachable();
+		  go_unreachable();
 
 		tree call = Gogo::call_builtin(pfndecl,
 					       location,
@@ -8288,7 +8288,7 @@ 
       }
 
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -8570,7 +8570,7 @@ 
 void
 Call_expression::do_set_recover_arg(Expression*)
 {
-  gcc_unreachable();
+  go_unreachable();
 }
 
 // Get the type.
@@ -8927,7 +8927,7 @@ 
   else if (interface_method != NULL)
     fn = this->interface_method_function(context, interface_method, &args[0]);
   else
-    gcc_unreachable();
+    go_unreachable();
 
   if (fn == error_mark_node || TREE_TYPE(fn) == error_mark_node)
     {
@@ -10318,7 +10318,7 @@ 
 tree
 Interface_field_reference_expression::do_get_tree(Translate_context*)
 {
-  gcc_unreachable();
+  go_unreachable();
 }
 
 // Make a reference to a field in an interface.
@@ -12409,7 +12409,7 @@ 
   // this in global scope.
   void
   do_export(Export*) const
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   // The composite literal which is being put on the heap.
@@ -12604,7 +12604,7 @@ 
     case TYPE_INFO_FIELD_ALIGNMENT:
       return Type::lookup_integer_type("uint8");
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
diff -r 969c61627ab5 go/expressions.h
--- a/go/expressions.h	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/expressions.h	Fri Apr 22 17:00:20 2011 -0700
@@ -877,15 +877,15 @@ 
 
   void
   do_determine_type(const Type_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   void
   do_check_types(Gogo*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   tree
   do_get_tree(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 };
 
 // An expression which is simply a variable.
diff -r 969c61627ab5 go/gogo-tree.cc
--- a/go/gogo-tree.cc	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/gogo-tree.cc	Fri Apr 22 17:00:20 2011 -0700
@@ -972,7 +972,7 @@ 
     case NAMED_OBJECT_VAR:
     case NAMED_OBJECT_RESULT_VAR:
     case NAMED_OBJECT_SINK:
-      gcc_unreachable();
+      go_unreachable();
 
     case NAMED_OBJECT_FUNC:
       {
@@ -1005,7 +1005,7 @@ 
       break;
 
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 
   if (TREE_TYPE(decl) == error_mark_node)
@@ -2424,7 +2424,7 @@ 
 	fndecl = no->func_declaration_value()->get_or_make_decl(this, no,
 								fnid);
       else
-	gcc_unreachable();
+	go_unreachable();
       fndecl = build_fold_addr_expr(fndecl);
 
       elt = VEC_quick_push(constructor_elt, pointers, NULL);
diff -r 969c61627ab5 go/gogo.cc
--- a/go/gogo.cc	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/gogo.cc	Fri Apr 22 17:00:20 2011 -0700
@@ -748,7 +748,7 @@ 
 								  function);
 	    }
 	  else
-	    gcc_unreachable();
+	    go_unreachable();
 	}
       this->package_->bindings()->add_method(ret);
     }
@@ -849,7 +849,7 @@ 
 	  return ftype->add_method_declaration(name, type, location);
 	}
       else
-	gcc_unreachable();
+	go_unreachable();
     }
 }
 
@@ -3211,7 +3211,7 @@ 
 	    case Named_object::NAMED_OBJECT_FUNC:
 	    case Named_object::NAMED_OBJECT_FUNC_DECLARATION:
 	      // FIXME: Where will nested functions be found?
-	      gcc_unreachable();
+	      go_unreachable();
 
 	    case Named_object::NAMED_OBJECT_TYPE:
 	      if ((traverse_mask & Traverse::traverse_types) != 0
@@ -3229,10 +3229,10 @@ 
 
 	    case Named_object::NAMED_OBJECT_PACKAGE:
 	    case Named_object::NAMED_OBJECT_SINK:
-	      gcc_unreachable();
+	      go_unreachable();
 
 	    default:
-	      gcc_unreachable();
+	      go_unreachable();
 	    }
 	}
     }
@@ -4109,7 +4109,7 @@ 
     {
     default:
     case NAMED_OBJECT_UNINITIALIZED:
-      gcc_unreachable();
+      go_unreachable();
 
     case NAMED_OBJECT_UNKNOWN:
       return this->unknown_value()->location();
@@ -4130,7 +4130,7 @@ 
       return this->result_var_value()->location();
 
     case NAMED_OBJECT_SINK:
-      gcc_unreachable();
+      go_unreachable();
 
     case NAMED_OBJECT_FUNC:
       return this->func_value()->location();
@@ -4153,7 +4153,7 @@ 
     default:
     case NAMED_OBJECT_UNINITIALIZED:
     case NAMED_OBJECT_UNKNOWN:
-      gcc_unreachable();
+      go_unreachable();
 
     case NAMED_OBJECT_CONST:
       this->const_value()->export_const(exp, this->name_);
@@ -4179,7 +4179,7 @@ 
 
     case NAMED_OBJECT_RESULT_VAR:
     case NAMED_OBJECT_SINK:
-      gcc_unreachable();
+      go_unreachable();
 
     case NAMED_OBJECT_FUNC:
       this->func_value()->export_func(exp, this->name_);
@@ -4199,7 +4199,7 @@ 
     return this->result_var_value()->get_backend_variable(gogo, function,
 							  this->name_);
   else
-    gcc_unreachable();
+    go_unreachable();
 }
 
 // Class Bindings.
@@ -4280,7 +4280,7 @@ 
 	  return;
 	}
     }
-  gcc_unreachable();
+  go_unreachable();
 }
 
 // Add a method to the list of objects.  This is not added to the
@@ -4346,7 +4346,7 @@ 
     {
     default:
     case Named_object::NAMED_OBJECT_UNINITIALIZED:
-      gcc_unreachable();
+      go_unreachable();
 
     case Named_object::NAMED_OBJECT_UNKNOWN:
       {
@@ -4386,7 +4386,7 @@ 
       break;
 
     case Named_object::NAMED_OBJECT_SINK:
-      gcc_unreachable();
+      go_unreachable();
 
     case Named_object::NAMED_OBJECT_FUNC:
       if (new_object->is_function_declaration())
@@ -4595,7 +4595,7 @@ 
 
 	case Named_object::NAMED_OBJECT_SINK:
 	default:
-	  gcc_unreachable();
+	  go_unreachable();
 	}
     }
 
@@ -4756,41 +4756,41 @@ 
 int
 Traverse::variable(Named_object*)
 {
-  gcc_unreachable();
+  go_unreachable();
 }
 
 int
 Traverse::constant(Named_object*, bool)
 {
-  gcc_unreachable();
+  go_unreachable();
 }
 
 int
 Traverse::function(Named_object*)
 {
-  gcc_unreachable();
+  go_unreachable();
 }
 
 int
 Traverse::block(Block*)
 {
-  gcc_unreachable();
+  go_unreachable();
 }
 
 int
 Traverse::statement(Block*, size_t*, Statement*)
 {
-  gcc_unreachable();
+  go_unreachable();
 }
 
 int
 Traverse::expression(Expression**)
 {
-  gcc_unreachable();
+  go_unreachable();
 }
 
 int
 Traverse::type(Type*)
 {
-  gcc_unreachable();
+  go_unreachable();
 }
diff -r 969c61627ab5 go/lex.cc
--- a/go/lex.cc	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/lex.cc	Fri Apr 22 17:00:20 2011 -0700
@@ -198,7 +198,7 @@ 
       mpfr_init_set(this->u_.float_value, tok.u_.float_value, GMP_RNDN);
       break;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -237,7 +237,7 @@ 
       mpfr_init_set(this->u_.float_value, tok.u_.float_value, GMP_RNDN);
       break;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
   return *this;
 }
@@ -422,11 +422,11 @@ 
 	  fprintf(file, "]");
 	  break;
 	default:
-	  gcc_unreachable();
+	  go_unreachable();
 	}
       break;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
diff -r 969c61627ab5 go/parse.cc
--- a/go/parse.cc	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/parse.cc	Fri Apr 22 17:00:20 2011 -0700
@@ -35,7 +35,7 @@ 
   // If we get here it means that a single nested function refers to
   // two different variables defined in enclosing functions, and both
   // variables have the same name.  I think this is impossible.
-  gcc_unreachable();
+  go_unreachable();
 }
 
 // Class Parse.
@@ -362,7 +362,7 @@ 
   else if (named_object->is_unknown() || named_object->is_type_declaration())
     return Type::make_forward_declaration(named_object);
   else
-    gcc_unreachable();
+    go_unreachable();
 }
 
 // ArrayType = "[" [ ArrayLength ] "]" ElementType .
@@ -2323,10 +2323,10 @@ 
 	  case Named_object::NAMED_OBJECT_UNKNOWN:
 	    return Expression::make_unknown_reference(named_object, location);
 	  default:
-	    gcc_unreachable();
+	    go_unreachable();
 	  }
       }
-      gcc_unreachable();
+      go_unreachable();
 
     case Token::TOKEN_STRING:
       ret = Expression::make_string(token->string_value(), token->location());
@@ -3068,7 +3068,7 @@ 
     case Token::TOKEN_IMAGINARY:
       return true;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -3493,7 +3493,7 @@ 
   else if (token->is_op(OPERATOR_MINUSMINUS))
     this->gogo_->add_statement(Statement::make_dec_statement(exp));
   else
-    gcc_unreachable();
+    go_unreachable();
   this->advance_token();
 }
 
@@ -4858,7 +4858,7 @@ 
   else if (enclosing->classification() == Statement::STATEMENT_SELECT)
     label = enclosing->select_statement()->break_label();
   else
-    gcc_unreachable();
+    go_unreachable();
 
   this->gogo_->add_statement(Statement::make_break_statement(label,
 							     location));
@@ -4907,7 +4907,7 @@ 
   else if (enclosing->classification() == Statement::STATEMENT_FOR_RANGE)
     label = enclosing->for_range_statement()->continue_label();
   else
-    gcc_unreachable();
+    go_unreachable();
 
   this->gogo_->add_statement(Statement::make_continue_statement(label,
 								location));
diff -r 969c61627ab5 go/runtime.cc
--- a/go/runtime.cc	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/runtime.cc	Fri Apr 22 17:00:20 2011 -0700
@@ -86,7 +86,7 @@ 
 	{
 	default:
 	case RFT_VOID:
-	  gcc_unreachable();
+	  go_unreachable();
 
 	case RFT_BOOL:
 	  t = Type::lookup_bool_type();
@@ -193,7 +193,7 @@ 
     {
     default:
     case RFT_VOID:
-      gcc_unreachable();
+      go_unreachable();
 
     case RFT_BOOL:
     case RFT_BOOLPTR:
diff -r 969c61627ab5 go/statements.cc
--- a/go/statements.cc	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/statements.cc	Fri Apr 22 17:00:20 2011 -0700
@@ -177,7 +177,7 @@ 
 
   Bstatement*
   do_get_backend(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 };
 
 // Make an error statement.
@@ -595,14 +595,14 @@ 
 
   bool
   do_traverse_assignments(Traverse_assignments*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   Statement*
   do_lower(Gogo*, Named_object*, Block*);
 
   Bstatement*
   do_get_backend(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   // The operator (OPERATOR_PLUSEQ, etc.).
@@ -677,7 +677,7 @@ 
       op = OPERATOR_BITCLEAR;
       break;
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 
   Expression* binop = Expression::make_binary(op, lval, this->rhs_, loc);
@@ -722,14 +722,14 @@ 
 
   bool
   do_traverse_assignments(Traverse_assignments*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   Statement*
   do_lower(Gogo*, Named_object*, Block*);
 
   Bstatement*
   do_get_backend(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   // Left hand side--a list of lvalues.
@@ -849,14 +849,14 @@ 
 
   bool
   do_traverse_assignments(Traverse_assignments*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   Statement*
   do_lower(Gogo*, Named_object*, Block*);
 
   Bstatement*
   do_get_backend(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   // Lvalue which receives the value from the map.
@@ -976,14 +976,14 @@ 
 
   bool
   do_traverse_assignments(Traverse_assignments*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   Statement*
   do_lower(Gogo*, Named_object*, Block*);
 
   Bstatement*
   do_get_backend(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   // A reference to the map index which should be set or deleted.
@@ -1090,14 +1090,14 @@ 
 
   bool
   do_traverse_assignments(Traverse_assignments*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   Statement*
   do_lower(Gogo*, Named_object*, Block*);
 
   Bstatement*
   do_get_backend(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   // Lvalue which receives the value from the channel.
@@ -1214,14 +1214,14 @@ 
 
   bool
   do_traverse_assignments(Traverse_assignments*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   Statement*
   do_lower(Gogo*, Named_object*, Block*);
 
   Bstatement*
   do_get_backend(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   Call_expression*
@@ -1510,14 +1510,14 @@ 
 
   bool
   do_traverse_assignments(Traverse_assignments*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   Statement*
   do_lower(Gogo*, Named_object*, Block*);
 
   Bstatement*
   do_get_backend(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   // The l-value to increment or decrement.
@@ -1830,7 +1830,7 @@ 
       vals->push_back(first_arg);
     }
   else
-    gcc_unreachable();
+    go_unreachable();
 
   if (ce->args() != NULL)
     {
@@ -1866,7 +1866,7 @@ 
   else if (this->classification() == STATEMENT_DEFER)
     s = Statement::make_defer_statement(call, location);
   else
-    gcc_unreachable();
+    go_unreachable();
 
   // The current block should end with the go statement.
   go_assert(block->statements()->size() >= 1);
@@ -2750,7 +2750,7 @@ 
   mpz_t ival;
   mpz_init(ival);
   if (!pe->integer_constant_value(true, ival, &itype))
-    gcc_unreachable();
+    go_unreachable();
   size_t ret = mpz_get_ui(ival);
   mpz_clear(ival);
   return ret;
@@ -2776,7 +2776,7 @@ 
   mpz_init(bval);
   if (!a->integer_constant_value(true, aval, &atype)
       || !b->integer_constant_value(true, bval, &btype))
-    gcc_unreachable();
+    go_unreachable();
   bool ret = mpz_cmp(aval, bval) == 0;
   mpz_clear(aval);
   mpz_clear(bval);
@@ -4597,7 +4597,7 @@ 
 			      index_temp, value_temp, &init, &cond, &iter_init,
 			      &post);
   else
-    gcc_unreachable();
+    go_unreachable();
 
   if (iter_init != NULL)
     body->add_statement(Statement::make_block_statement(iter_init, loc));
diff -r 969c61627ab5 go/statements.h
--- a/go/statements.h	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/statements.h	Fri Apr 22 17:00:20 2011 -0700
@@ -990,14 +990,14 @@ 
 
   bool
   do_traverse_assignments(Traverse_assignments*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   Statement*
   do_lower(Gogo*, Named_object*, Block*);
 
   Bstatement*
   do_get_backend(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   // The initialization statements.  This may be NULL.
@@ -1048,14 +1048,14 @@ 
 
   bool
   do_traverse_assignments(Traverse_assignments*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   Statement*
   do_lower(Gogo*, Named_object*, Block*);
 
   Bstatement*
   do_get_backend(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   Expression*
@@ -1284,7 +1284,7 @@ 
 
   Bstatement*
   do_get_backend(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   // The value to switch on.  This may be NULL.
@@ -1430,7 +1430,7 @@ 
 
   Bstatement*
   do_get_backend(Translate_context*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
  private:
   // The variable holding the value we are switching on.
diff -r 969c61627ab5 go/types.cc
--- a/go/types.cc	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/types.cc	Fri Apr 22 17:00:20 2011 -0700
@@ -157,7 +157,7 @@ 
       return this->base()->is_basic_type();
 
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -202,7 +202,7 @@ 
     case TYPE_BOOLEAN:
       return Type::lookup_bool_type();
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -407,7 +407,7 @@ 
       return false;
 
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -774,7 +774,7 @@ 
 bool
 Type::do_check_make_expression(Expression_list*, source_location)
 {
-  gcc_unreachable();
+  go_unreachable();
 }
 
 // Return whether an expression has an integer value.  Report an error
@@ -929,7 +929,7 @@ 
 Type::do_make_expression_tree(Translate_context*, Expression_list*,
 			      source_location)
 {
-  gcc_unreachable();
+  go_unreachable();
 }
 
 // Return a pointer to the type descriptor for this type.
@@ -1194,10 +1194,10 @@ 
 
     case Type::TYPE_NAMED:
     case Type::TYPE_FORWARD:
-      gcc_unreachable();
+      go_unreachable();
 
     default:
-      gcc_unreachable();
+      go_unreachable();
     }
 }
 
@@ -1543,7 +1543,7 @@ 
 void
 Type::do_export(Export*) const
 {
-  gcc_unreachable();
+  go_unreachable();
 }
 
 // Import a type.
@@ -1627,11 +1627,11 @@ 
 
   tree
   do_get_init_tree(Gogo*, tree, bool)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   Expression*
   do_type_descriptor(Gogo*, Named_type*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   void
   do_reflection(Gogo*, std::string*) const
@@ -2363,23 +2363,23 @@ 
  protected:
   tree
   do_get_tree(Gogo*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   tree
   do_get_init_tree(Gogo*, tree, bool)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   Expression*
   do_type_descriptor(Gogo*, Named_type*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   void
   do_reflection(Gogo*, std::string*) const
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   void
   do_mangled_name(Gogo*, std::string*) const
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 };
 
 // Make the sink type.
@@ -3298,11 +3298,11 @@ 
 
   Expression*
   do_type_descriptor(Gogo*, Named_type*)
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   void
   do_reflection(Gogo*, std::string*) const
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   void
   do_mangled_name(Gogo*, std::string* ret) const
@@ -3434,7 +3434,7 @@ 
 	  else if (t->named_type() != NULL)
 	    return t->named_type()->name();
 	  else
-	    gcc_unreachable();
+	    go_unreachable();
 	}
     }
 }
@@ -5837,7 +5837,7 @@ 
        ++p, ++ret)
     if (p->name() == name)
       return ret;
-  gcc_unreachable();
+  go_unreachable();
 }
 
 // Return whether NAME is an unexported method, for better error
@@ -6621,7 +6621,7 @@ 
   else if (this->named_object_->is_function_declaration())
     return this->named_object_->func_declaration_value()->type();
   else
-    gcc_unreachable();
+    go_unreachable();
 }
 
 // Return the location of the method receiver.
@@ -7024,7 +7024,7 @@ 
 	case Type::TYPE_NAMED:
 	case Type::TYPE_FORWARD:
 	default:
-	  gcc_unreachable();
+	  go_unreachable();
 	}
     }
 
@@ -7190,7 +7190,7 @@ 
     case TYPE_CALL_MULTIPLE_RESULT:
     case TYPE_NAMED:
     case TYPE_FORWARD:
-      gcc_unreachable();
+      go_unreachable();
     }
 
   this->named_tree_ = t;
@@ -7294,7 +7294,7 @@ 
     case TYPE_CALL_MULTIPLE_RESULT:
     case TYPE_NAMED:
     case TYPE_FORWARD:
-      gcc_unreachable();
+      go_unreachable();
     }
 
   // Create the named type.
@@ -7424,10 +7424,10 @@ 
     case TYPE_CALL_MULTIPLE_RESULT:
     case TYPE_NAMED:
     case TYPE_FORWARD:
-      gcc_unreachable();
-    }
-
-  gcc_unreachable();
+      go_unreachable();
+    }
+
+  go_unreachable();
 }
 
 // Build a type descriptor for a named type.
@@ -7964,7 +7964,7 @@ 
   else if (no->is_function_declaration())
     fntype = no->func_declaration_value()->type();
   else
-    gcc_unreachable();
+    go_unreachable();
   return fntype->receiver()->type()->points_to() != NULL;
 }
 
@@ -8061,7 +8061,7 @@ 
 	  else if (st != NULL)
 	    m = st->method_function(name, NULL);
 	  else
-	    gcc_unreachable();
+	    go_unreachable();
 	  go_assert(m != NULL);
 	  if (!m->is_value_method() && expr->type()->points_to() == NULL)
 	    expr = Expression::make_unary(OPERATOR_AND, expr, location);
diff -r 969c61627ab5 go/types.h
--- a/go/types.h	Fri Apr 22 11:33:30 2011 -0700
+++ b/go/types.h	Fri Apr 22 17:00:20 2011 -0700
@@ -272,7 +272,7 @@ 
   // called, as we always create a stub.
   Named_object*
   do_named_object() const
-  { gcc_unreachable(); }
+  { go_unreachable(); }
 
   // The type of the method.
   Function_type*