aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2010-12-15 21:50:51 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2010-12-15 21:50:51 +0000
commitf4ba233240e84b2267a509e5eec315c22647e26e (patch)
treeb17d77cd5030e9d3dc1d914dd496bbc439054a60 /gcc
parent3870e7a5da2125d7be402a7b7b4d3749d7e245d5 (diff)
downloadgcc-f4ba233240e84b2267a509e5eec315c22647e26e.zip
gcc-f4ba233240e84b2267a509e5eec315c22647e26e.tar.gz
gcc-f4ba233240e84b2267a509e5eec315c22647e26e.tar.bz2
Fix test for invalid type in anonymous field.
From-SVN: r167875
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/types.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc
index 4faae85..bb93a4e 100644
--- a/gcc/go/gofrontend/types.cc
+++ b/gcc/go/gofrontend/types.cc
@@ -7754,7 +7754,8 @@ Type::find_field_or_method(const Type* type,
if (!pf->is_anonymous())
continue;
- if (pf->type()->is_error_type() || pf->type()->is_undefined())
+ if (pf->type()->deref()->is_error_type()
+ || pf->type()->deref()->is_undefined())
continue;
Named_type* fnt = pf->type()->deref()->named_type();
@@ -7875,7 +7876,8 @@ Type::is_unexported_field_or_method(Gogo* gogo, const Type* type,
++pf)
{
if (pf->is_anonymous()
- && (!pf->type()->is_error_type() && !pf->type()->is_undefined()))
+ && (!pf->type()->deref()->is_error_type()
+ && !pf->type()->deref()->is_undefined()))
{
Named_type* subtype = pf->type()->deref()->named_type();
gcc_assert(subtype != NULL);