cmd/compile accepts this invalid Go source file:
package p
import "unsafe"
type s struct { unsafe.Pointer }
gotype and gccgo correctly reject it:
$ gotype p.go
p.go:3:17: anonymous field type cannot be unsafe.Pointer
$ gccgo-4.8 -c p.go
p.go:3:17: error: embedded type may not be a pointer
type s struct { unsafe.Pointer }
^
The Go spec says:
A field declared with a type but no explicit field name is an anonymous field, also called an embedded field or an embedding of the type in the struct. An embedded type must be specified as a type name T or as a pointer to a non-interface type name *T, and T itself may not be a pointer type.
And later describing package unsafe:
A Pointer is a pointer type but a Pointer value may not be dereferenced.