OSDN Git Service

compiler: avoid an ICE on bound interface methods used as values.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Mar 2012 22:25:53 +0000 (22:25 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Mar 2012 22:25:53 +0000 (22:25 +0000)
Updates issue 7.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@185934 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/expressions.cc

index f2a81de..f1e0639 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.