summaryrefslogtreecommitdiff
path: root/src/cmd/gc/reflect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/gc/reflect.c')
-rw-r--r--src/cmd/gc/reflect.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/gc/reflect.c b/src/cmd/gc/reflect.c
index d128bf117..fc182b03e 100644
--- a/src/cmd/gc/reflect.c
+++ b/src/cmd/gc/reflect.c
@@ -1046,6 +1046,9 @@ dgcsym1(Sym *s, int ot, Type *t, vlong *off, int stack_size)
if(t->align > 0 && (*off % t->align) != 0)
fatal("dgcsym1: invalid initial alignment, %T", t);
+
+ if(t->width == BADWIDTH)
+ dowidth(t);
switch(t->etype) {
case TINT8:
@@ -1141,6 +1144,8 @@ dgcsym1(Sym *s, int ot, Type *t, vlong *off, int stack_size)
case TARRAY:
if(t->bound < -1)
fatal("dgcsym1: invalid bound, %T", t);
+ if(t->type->width == BADWIDTH)
+ dowidth(t->type);
if(isslice(t)) {
// NOTE: Any changes here need to be made to reflect.SliceOf as well.
// struct { byte* array; uint32 len; uint32 cap; }
@@ -1214,6 +1219,9 @@ dgcsym(Type *t)
return s;
s->flags |= SymGcgen;
+ if(t->width == BADWIDTH)
+ dowidth(t);
+
ot = 0;
off = 0;
ot = duintptr(s, ot, t->width);