From 0ca82dd6bae0055cf2c8b95823dea52a1d2e92f0 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 19 Jan 2011 15:47:50 +0000 Subject: Fix handling of anonymous field in struct with pointer type. From-SVN: r169001 --- gcc/go/gofrontend/types.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index bbf217a..1a68e77 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -7948,7 +7948,9 @@ Type::find_field_or_method(const Type* type, || pf->type()->deref()->is_undefined()) continue; - Named_type* fnt = pf->type()->deref()->named_type(); + Named_type* fnt = pf->type()->named_type(); + if (fnt == NULL) + fnt = pf->type()->deref()->named_type(); gcc_assert(fnt != NULL); int sublevel = level == NULL ? 1 : *level + 1; -- cgit v1.1