diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-02-10 23:07:36 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-02-10 23:07:36 +0000 |
commit | 8629c99851908ef1b958c35be0fe2b279f1275b3 (patch) | |
tree | d77beaa70e88a771d6465016c599dda4d991ee50 | |
parent | 0cf1541f0c4cd9ad50d6e06a1f9dd0dd54b4a9c0 (diff) | |
download | gcc-8629c99851908ef1b958c35be0fe2b279f1275b3.zip gcc-8629c99851908ef1b958c35be0fe2b279f1275b3.tar.gz gcc-8629c99851908ef1b958c35be0fe2b279f1275b3.tar.bz2 |
Don't crash when referring to method other than calling it.
From-SVN: r170028
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 1089c6d..bc27480 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -6397,7 +6397,8 @@ Bound_method_expression::do_check_types(Gogo*) tree Bound_method_expression::do_get_tree(Translate_context*) { - gcc_unreachable(); + error_at(this->location(), "reference to method other than calling it"); + return error_mark_node; } // Make a method expression. |