diff --git a/src/reflect/all_test.go b/src/reflect/all_test.go index 077220ac7f..63d068cd78 100644 --- a/src/reflect/all_test.go +++ b/src/reflect/all_test.go @@ -4399,6 +4399,17 @@ func TestStructOf(t *testing.T) { }) // check that type already in binary is found checkSameType(t, StructOf(fields[2:3]), struct{ Y uint64 }{}) + + // gccgo used to fail this test. + type structFieldType interface{} + checkSameType(t, + StructOf([]StructField{ + StructField{ + Name: "F", + Type: TypeOf((*structFieldType)(nil)).Elem(), + }, + }), + struct{ F structFieldType }{}) } func TestStructOfExportRules(t *testing.T) {