Fix the missing type encoding for structures.

There should be a better way (probably by doing the encoding as needed
rather than in chain_type), but this seems to work for now.
This commit is contained in:
Bill Currie 2011-02-27 00:37:35 +09:00
parent 438d14d852
commit c8f1b5b1f0

View file

@ -56,6 +56,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "emit.h"
#include "expr.h"
#include "immediate.h"
#include "obj_type.h"
#include "qfcc.h"
#include "reloc.h"
#include "strpool.h"
@ -132,6 +133,8 @@ build_struct (int su, symbol_t *tag, symtab_t *symtab, type_t *type)
if (!type)
sym->type = find_type (sym->type); // checks the tag, not the symtab
sym->type->t.symtab = symtab;
if (!type && sym->type->type_def->external) //FIXME should not be necessary
sym->type->type_def = qfo_encode_type (sym->type);
return sym;
}