diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/types.cc | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index edcea96..9576230 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -9d0d5c03a8086f5dd3a23e910abd6e470196973c +52ebad939927e6cbfb48dd277cef8db451e36533 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index 4d92373..cde1408 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -11829,6 +11829,12 @@ Type::bind_field_or_method(Gogo* gogo, const Type* type, Expression* expr, go_assert(st != NULL); if (type->struct_type() == NULL) { + if (dereferenced) + { + go_error_at(location, "pointer type has no field %qs", + Gogo::message_name(name).c_str()); + return Expression::make_error(location); + } go_assert(type->points_to() != NULL); expr = Expression::make_unary(OPERATOR_MULT, expr, location); |