From: Ian Lance Taylor Date: Fri, 24 Dec 2010 00:51:10 +0000 (+0000) Subject: Don't crash on invalid use of multiple results. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3746f0c781beee40cd72fccfe88357bc16ffe1f9;p=gcc.git Don't crash on invalid use of multiple results. From-SVN: r168222 --- diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index 6ea52971728..02165371503 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -3253,26 +3253,35 @@ class Call_multiple_result_type : public Type protected: bool do_has_pointer() const - { gcc_unreachable(); } + { + gcc_assert(saw_errors()); + return false; + } tree do_get_tree(Gogo*); tree do_get_init_tree(Gogo*, tree, bool) - { gcc_unreachable(); } + { + gcc_assert(saw_errors()); + return error_mark_node; + } Expression* do_type_descriptor(Gogo*, Named_type*) - { gcc_unreachable(); } + { + gcc_assert(saw_errors()); + return Expression::make_error(UNKNOWN_LOCATION); + } void do_reflection(Gogo*, std::string*) const - { gcc_unreachable(); } + { gcc_assert(saw_errors()); } void do_mangled_name(Gogo*, std::string*) const - { gcc_unreachable(); } + { gcc_assert(saw_errors()); } private: // The expression being called.