1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
13 // Test that the struct field in anonunion.go was promoted.
17 // Test that P, Q, and R all point to byte.
18 var v3 = Issue8478{P: (*byte)(nil), Q: (**byte)(nil), R: (***byte)(nil)}
20 // Test that N, A and B are fully defined
25 // Test that S is fully defined
28 // Test that #define'd type is fully defined
29 var _ = issue38649{X: 0}
31 // Test that prefixes do not cause duplicate field names.
32 var _ = Issue48396{Fd: 1, Bpf_fd: 2}
37 // The Go translation of bitfields should not have any of the
38 // bitfield types. The order in which bitfields are laid out
39 // in memory is implementation defined, so we can't easily
40 // know how a bitfield should correspond to a Go type, even if
41 // it appears to be aligned correctly.
42 bitfieldType := reflect.TypeOf(bitfields{})
43 check := func(name string) {
44 _, ok := bitfieldType.FieldByName(name)
46 fmt.Fprintf(os.Stderr, "found unexpected bitfields field %s\n", name)