diff --git a/src/cmd/gc/reflect.c b/src/cmd/gc/reflect.c index 3f4734ef52..75d7d8c1c8 100644 --- a/src/cmd/gc/reflect.c +++ b/src/cmd/gc/reflect.c @@ -125,6 +125,8 @@ mapbucket(Type *t) keytype = t->down; valtype = t->type; + dowidth(keytype); + dowidth(valtype); if(keytype->width > MAXKEYSIZE) keytype = ptrto(keytype); if(valtype->width > MAXVALSIZE) diff --git a/test/fixedbugs/issue7547.go b/test/fixedbugs/issue7547.go new file mode 100644 index 0000000000..f75a33036f --- /dev/null +++ b/test/fixedbugs/issue7547.go @@ -0,0 +1,17 @@ +// compile + +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +func f() map[string]interface{} { + var p *map[string]map[string]interface{} + _ = p + return nil +} + +func main() { + f() +}