compiler: avoid an ICE on bound interface methods used as values.
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 28 Mar 2012 22:25:37 +0000 (22:25 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 28 Mar 2012 22:25:37 +0000 (22:25 +0000)
Updates issue 7.

From-SVN: r185933

gcc/go/gofrontend/expressions.cc

index f2a81de8add49ba3ae4c1b5b563cd23f6f61730f..f1e06397cfa3d0b3c796acd6b00f059006815196 100644 (file)
@@ -10577,7 +10577,8 @@ Interface_field_reference_expression::do_check_types(Gogo*)
 tree
 Interface_field_reference_expression::do_get_tree(Translate_context*)
 {
-  go_unreachable();
+  error_at(this->location(), "reference to method other than calling it");
+  return error_mark_node;
 }
 
 // Dump ast representation for an interface field reference.