projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f315816
)
Don't crash looking for methods of pointer to error type.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 23 Feb 2011 05:53:37 +0000
(
05:53
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 23 Feb 2011 05:53:37 +0000
(
05:53
+0000)
From-SVN: r170431
gcc/go/gofrontend/types.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/types.cc
b/gcc/go/gofrontend/types.cc
index 90bc4e1d4a9d0a83ced2daf3bbf94c854000808f..8ce39b790c54cc2207a88b80d016a3612c06158a 100644
(file)
--- 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();