aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-02-23 05:53:37 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-02-23 05:53:37 +0000
commitff72e86dfda00631473eca57b8d2af3ef7475c73 (patch)
tree2608a29df50a47511a474247d0da75316b88f000 /gcc
parentf315816c37c235b0f99593080501c2e3855c3568 (diff)
downloadgcc-ff72e86dfda00631473eca57b8d2af3ef7475c73.zip
gcc-ff72e86dfda00631473eca57b8d2af3ef7475c73.tar.gz
gcc-ff72e86dfda00631473eca57b8d2af3ef7475c73.tar.bz2
Don't crash looking for methods of pointer to error type.
From-SVN: r170431
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/types.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc
index 90bc4e1..8ce39b7 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -7799,6 +7799,8 @@ Type::bind_field_or_method(Gogo* gogo, const Type* type, Expression* expr,
{
expr = Expression::make_unary(OPERATOR_MULT, expr, location);
type = type->points_to();
+ if (type->deref()->is_error_type())
+ return Expression::make_error(location);
nt = type->points_to()->named_type();
st = type->points_to()->struct_type();
it = type->points_to()->interface_type();